两条实用的 SQL 语句
生活随笔
收集整理的這篇文章主要介紹了
两条实用的 SQL 语句
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
--讀取庫中的所有表名
Select [name] from sysobjects where xtype = 'u'
--讀取指定表的所有列名
Select [name] from syscolumns
where id = (Select MAX(id) from sysobjects where xtype = 'u' and [name] = '表名')
Select [name] from sysobjects where xtype = 'u'
--讀取指定表的所有列名
Select [name] from syscolumns
where id = (Select MAX(id) from sysobjects where xtype = 'u' and [name] = '表名')
轉載于:https://www.cnblogs.com/walfud/archive/2011/05/13/2045408.html
總結
以上是生活随笔為你收集整理的两条实用的 SQL 语句的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Biorhythms ACM PKU h
- 下一篇: linux cmake编译源码,linu