宠妻之二货娘子txt:判断数据库中某个表是否存在的asp代码
来源:百度文库 编辑:高校问答 时间:2024/05/07 14:40:04
select count(*) as counts from 数据库名.dbo.sysobjects where name='表名' and type='u'
比如你要查看 mydb数据库下,是否存在mytable表语句就是
select count(*) as counts from mydb.dbo.sysobjects where name='mytable' and type='u'
在ASP里得到rs("counts")的值,如果大于0,则mytable表就存在。