zoukankan      html  css  js  c++  java
  • sql 语句

    //查询所有用户表

     
    select * FROM sysobjects WHERE type='U' ORDER BY name
     
    select * from sys.tables

     

    select a.name AS '字段名',b.name AS '类型',a.length AS '长度'  from syscolumns a LEFT JOIN systypes b
    ON a.xtype=b.xusertype
    where a.ID = OBJECT_ID('表名')

     

    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');

  • 相关阅读:
    02:找第一个只出现一次的字符
    11-Canvas
    07-jQuery
    06-JavaScript高级
    05-Web API
    03-京东项目
    剑与远征-兑换码
    04-JavaScript基础语法
    02-CSS
    01-HTML
  • 原文地址:https://www.cnblogs.com/andy_tigger/p/1781484.html
Copyright © 2011-2022 走看看