摘要:
SQL SERVER 查询数据库对象(视图和存储过程等)的创建脚本select text from syscomments where id =(select id from sysobjects where name='vw_orderitem'--vw_orderitem为视图的名称)可以查询表名,视图名,存储过程名等select * from sysobjects --where xtype='U' --表名--where xtype='V' --视图名--where xtype='PK' --主键--where xtype 阅读全文