您的位置:首页 > 移动开发 > Objective-C

通过查询数据库中的sysobjects来判断数据库中是否已有该表

2007-11-14 13:53 246 查看

if exists(select * from sysobjects where [name]='nb2' and type='U')


begin


print'该表已存在'


return


end


else


begin


print'该表不存在'


create table nb2(pid int ,[name] char(10),phone int)


print'创建表完成'


end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: