zoukankan      html  css  js  c++  java
  • 枚举 sql server 中的表名 (zz)

    //z 2012-3-16 11:34:36 AM IS2120@CSDN

    SQL Server 2005 or 2008:

    SELECT * FROM information_schema.tables
    

    SQL Server 2000:

    SELECT * FROM sysobjects WHERE xtype='U'
    


    SELECT sobjects.name
    FROM sysobjects sobjects
    WHERE sobjects.xtype = 'U'
    

    Here is a list of other object types you can search for as well:

    • C: Check constraint
    • D: Default constraint
    • F: Foreign Key constraint
    • L: Log
    • P: Stored procedure
    • PK: Primary Key constraint
    • RF: Replication Filter storedprocedure
    • S: System table
    • TR: Trigger
    • U: User table
    • UQ: Unique constraint
    • V: View
    • X: Extended stored procedure
    //z 2012-3-16 11:34:36 AM IS2120@CSDN

    SELECT * FROM INFORMATION_SCHEMA.TABLES 
    

    or Sys.Tables



    exec sp_msforeachtable 'print ''?'''
    
    //z 2012-3-16 11:34:36 AM IS2120@CSDN
  • 相关阅读:
    Tree Constructe(icpc济南)(二分图+构造)
    Cleaning(CF1474D)
    Matrix Equation (2020icpc济南)
    关于位运算
    poj2540半平面交+判范围
    做题记录0(并查集|树状数组)
    ac自动机
    二次剩余
    BSGS算法
    无向图的桥
  • 原文地址:https://www.cnblogs.com/IS2120/p/6745924.html
Copyright © 2011-2022 走看看