原创地址:http://blog.csdn.net/guguda2008/article/details/5716939 一个完整的建库语句是类似这样的: IF DB_ID('TEST') IS NOT NULL DROP DATABASE TESTGOCREATE DATABASE TESTON PRIMARY (NAME=TEST_DAT_MAIN1,FILENAME='D:/SQL2008DATAS/TEST_DAT_MAIN1.MDF',SIZE=3MB,MAXSIZE=UNLIMITE