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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -