口有异味是哪的毛病:判断数据库中某个表是否存在的asp代码
来源:百度文库 编辑:神马品牌网 时间:2024/05/09 14:59:13
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表就存在。