Error when creating database name using full of number in SQL Server 2008 R2 -


create database name using string, database create successfully.

example :

if db_id('database1') null create database database1 

command(s) completed successfully.

but create database name using full of number, having problem

example :

if db_id('1234567890') null create database 1234567890 

msg 102, level 15, state 1, line 1
incorrect syntax near '1234567890'.

is wrong in query?

try 1 -

if db_id('1234567890') null      create database [1234567890] 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -