sql server常用
2015-06-13 12:05
465 查看
写于2013年春
1、查列
2、查表及视图
3、字段内容默认不区分大小写
1、查列
select a.id table_id, a.name table_name, b.colid column_id, b.name column_name, c.data_type, c.character_maximum_length, cast(d.value as varchar) property from sys.sysobjects a join sys.syscolumns b on a.id = b.id join information_schema.columns c on a.name = c.table_name and b.colid = c.ordinal_position left join sys.extended_properties d on a.id = d.major_id and b.colid = d.minor_id where a.xtype = 'U' and a.name = 'admin' order by b.colid
2、查表及视图
select name from sysobjects where xtype='U' union select name from sysobjects where xtype='V'
3、字段内容默认不区分大小写
相关文章推荐
- 【m从翻译os文章】写日志禁令Sqlnet.log和Listener.log
- memcached 之 哈希一致性 和 虚拟节点 分析
- Linux下安装Memcached图解教程
- mysql win源码比较大 不需要的文件删除 记录下来
- Redis 起步
- postgresql安装配置
- mha+mysql自动切换
- MySQL常用
- C# / MSSQL / WinForm / ASP.NET - SQLHelper中返回SqlDataReader数据
- 数据库top和distinct的用法
- 现有的一些人脸数据库
- oracle常用
- Visual Studio + SqlServer
- 数据库SQLite
- 系统问题解决的后的思考,处理问题的思路(oracle关不掉,起不来)
- SQL两列字段合并为一个字符串,尾部加字符
- 1.SQL-简单查询&限定查询&查询排序
- Redis
- SqliteOpenHelper封装——DBManager模板
- mysql日志