views:

19

answers:

1

I've run this code in MySQL, and it's succeeded. But when I run it in SQL Server 2005, this error occurred:

Incorrect syntax near the keyword 'DEFAULT'

This is the code:

CREATE DATABASE mydb DEFAULT CHARACTER SET utf8

Anyone can explain why it couldn't run successfully in SQL Server 2005. Thanks and sorry for my bad English!

+2  A: 

SQL Server doesn't support the "default character set" on the "create database" statement: http://msdn.microsoft.com/en-us/library/ms176061(v=SQL.90).aspx

Adam Vandenberg
ok, thank you verymuch!
LeoLink