我使用sql server 2014及以下代码:
if db_id('handel') is not null
drop database handel;
create database handel;
use handel;
我收到错误:Database 'handel' does not exist. Make sure that the name is entered correctly.
在line上use handel
,这让我有些不高兴,就像在创建所述数据库之前的那一行一样。谁能帮忙吗?
您错过了GO关键字:
if db_id('handel') is not null
drop database handel;
create database handel;
GO
use handel;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句