两条实用的 SQL 语句
生活随笔
收集整理的這篇文章主要介紹了
两条实用的 SQL 语句
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
--讀取庫(kù)中的所有表名
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] = '表名')
轉(zhuǎn)載于:https://www.cnblogs.com/walfud/archive/2011/05/13/2045408.html
總結(jié)
以上是生活随笔為你收集整理的两条实用的 SQL 语句的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Biorhythms ACM PKU h
- 下一篇: 将军必在实战中成长