数据库特例操作,

//查询所有用户表

select [name], [id] from sysobjects where [type] = 'U';

//查询所有系统表

select [name], [id] from sysobjects where [type] = 'S';

//列出数据表中的所有字段

select * from syscolumns where ID = OBJECT_ID('S_CityList');

//查询所有用户表中的非重复字段

select distinct [name] from syscolumns

where ID in (select id from sysobjects where [type] = 'U');

posted @ 2010-10-29 09:53  袁雷  阅读(131)  评论(0)    收藏  举报