摘要:
一、系统表、字段操作select * from usermenu得到所有的数据表(用户数据表):select * from sysobjects where xtype = 'u'得到当前数据表的所有字段:select * from syscolumns where id = object_id('tb_clientdata')取字段、字段类型、字段长度select a.name,b.name,a.length from syscolumns a left join systypes b on a.xtype = b.xtype where id = objec 阅读全文
摘要:
SELECT 表名=CASE WHEN C.column_id=1 THEN O.name ELSE N'' END, 表说明=ISNULL(CASE WHEN C.column_id=1 THEN PTB.[value] END,N''), 字段序号=C.column_id, 字段名=C.name, 主键=ISNULL(IDX.PrimaryKey,N''), 标识=CASE WHEN C.is_identity=1 THEN N'√'ELSE N'' END, 计算列=CASE WHEN C.is_comput 阅读全文