sql 2008 if附近有语法错误
DROPDATABASEIFEXISTSdb_contact;CREATEDATABASEdb_contact;USEdb_contact;怎么改,发一下...
DROP DATABASE IF
EXISTS db_contact;CREATE DATABASE db_contact;USE db_contact;
怎么改,发一下 展开
EXISTS db_contact;CREATE DATABASE db_contact;USE db_contact;
怎么改,发一下 展开
1个回答
展开全部
use master
if exists (select name from master.dbo.sysdatabases where name = N' db_contact') drop database db_contact
go
create database db_contact on primary
(name = N'db_contact_data', filename = N'c:\db_contact.MDF' , size = 3072KB, maxsize = unlimited, filegrowth = 10240KB)
log on
(name = N'db_contact_log', filename = N'c:\db_contact.LDF' , size = 1024KB, maxsize = 2048GB, filegrowth = 10240KB)
collate Chinese_PRC_CI_AS_KS_WS
go
use db_contact
go
if exists (select name from master.dbo.sysdatabases where name = N' db_contact') drop database db_contact
go
create database db_contact on primary
(name = N'db_contact_data', filename = N'c:\db_contact.MDF' , size = 3072KB, maxsize = unlimited, filegrowth = 10240KB)
log on
(name = N'db_contact_log', filename = N'c:\db_contact.LDF' , size = 1024KB, maxsize = 2048GB, filegrowth = 10240KB)
collate Chinese_PRC_CI_AS_KS_WS
go
use db_contact
go
追问
collate Chinese_PRC_CI_AS_KS_WS这句是什么意思?
追答
这个区分这个数据库是否有全半角之分,你可以去详细看下设置
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询