select * from sysobjects where xtype='D'
我用上面这个语句查询的时候,表的名称和字段连在一起了,而且有些表名还不全,怎么办,请高手指点,谢谢!
------解决方案--------------------
- SQL code
select * from sysobjects a,syscolumns bwhere a.id=b.id and a.xtype='u'
------解决方案--------------------
楼上正解
------解决方案--------------------
- SQL code
select a.name dbname, b.name colname from sysobjects a , syscolumns b where a.id=b.id and a.xtype = 'u' order by a.name , b.colid