I’m writing a script to create a bunch of tables, and I read in the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa372021%28v=vs.85%29.aspx">Microsoft documentation</a> that I should use tick marks (aka grave) to enclose database, table, and field names, but when I run it in SQL Server Management Studio, I get a syntax error on the first tick:
CREATE TABLE `active`.`test` ( … )
^syntax error
So I tried running it thru a <a href="http://developer.mimer.com/validator/parser200x/index.tml#parser">lint</a>, and it told me that ` is an invalid character, and it suggested removing them, which totally messed up the script.
What gives?
The documentation you have linked to is:
This is not the syntax for SQL Server. I suggest looking at the Transact-SQL Reference instead.
You need to use
[]instead of the backtick: