patternsqlModerate
why we can specify table names enclosing them with []
Viewed 0 times
whycanwithnamesenclosingthemspecifytable
Problem
Is there a reason we can specify a tablename with [schema].[tableName] instead of just schema.tablename?
is it JUST to allow spaces in a tableName?
is it JUST to allow spaces in a tableName?
Solution
They're called Delimited Identifiers, and their primary purpose is to allow for special characters and keywords to be used in/as table names
For example, some genius decided the name of the primary table in a database I work with would be
They're really not needed at all except in those cases.
For example, some genius decided the name of the primary table in a database I work with would be
master, which is a keyword.They're really not needed at all except in those cases.
Context
StackExchange Database Administrators Q#12564, answer score: 16
Revisions (0)
No revisions yet.