使用的是c# sql vs 08 sql server 2005 express
无论何时何地,只要用到一条sql select语句,它总是这样
select * from tablename
或计数语句 也很像
select count something from table name
用于选择或在 table 上做任何事情,
我想知道我所连接的数据库中存在哪些表!
很喜欢
select alltablenames from database_name.
请指导。
请您参考如下方法:
就我个人而言,我会使用 Information_Schema.Tables 和 Information_Schema.Columns View ,因为这些是 Microsoft 提供的 View 。 (而不是使用 sysobjects 表)
