Legal/illegal characters in table name

  • nason.peter (4/8/2015)


    To address the point of the question, it is interesting/important to note that the same rules apply to database, schema and column names so you could in fact have a whole database with no visible names. I wonder if there are some security applications for this information.

    I think that it might go some toward making SQL injection harder.

    I do love SELECT [*] FROM [FROM] ORDER BY [ORDER BY] just to keep me on my toes. As far as practical for every day use, probably not. Naming tables and columns oddly on purpose is just mean. It's kind of like an Axe Throwing competition or juggling chain saws. Not very practical but a lot of fun.

    ATBCharles Kincaid

  • This assumes that you have a schema in the database named "tmp" otherwise it fails because the schema does not exist.

    in this question have a schema in the database named "dbo" instead of" tmp" . The table is created with out errors

  • Try to answer this one:

    Table Array[/url]

  • MyDoggieJessie (4/7/2015)


    This assumes that you have a schema in the database named "tmp" otherwise it fails because the schema does not exist.

    +1

    Guessed correctly that that important piece was omitted...

  • Executing your script in SQL 2008 R2 and SQL 2012 SSMS without the "tmp" schema is created I was getting the following message:

    Msg 2760, Level 16, State 1, Line 1

    The specified schema name "tmp" either does not exist or you do not have permission to use it.

    So in the view is this "Sorry but you are wrong". your script returns error in two environments.http://qa.sqlservercentral.com/Forums/Skins/Classic/Images/MessageIcons/ExclamationMark.gif

  • It gives error unless tmp schema is crated in the database

  • I did not expect that, but I will not use it that way either.

  • Good to know. This doesn't seem very practical though.

Viewing 8 posts - 46 through 52 (of 52 total)

You must be logged in to reply to this topic. Login to reply