Leo
Leo

Reputation: 1433

Character set in SQL Server 2005

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!

Upvotes: 1

Views: 1327

Answers (1)

Adam Vandenberg
Adam Vandenberg

Reputation: 20641

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

Upvotes: 3

Related Questions