sql server 数据库表、库查询操作

关于查询SQL Server数据库表信息的操作如下:

1、根据表名查询表里面的所有字段:

     select name from syscolumns where id= object_id('表名 ');

2、根据1中的sql可扩展以下语句:

     select count(name) from syscolumns where id= object_id('表名 ');

3、根据数据库的名称查询该数据库中所有表名

      select name from syscolumns where xtype='数据库名称 '

4、将数据表中的列字段值数据中的小写字母修改成大写

      update tableNmae set columnsNam=upper(columnsNam)

猜你喜欢

转载自blog.csdn.net/qq_42773229/article/details/87933954