zoukankan      html  css  js  c++  java
  • 查找表名与所有字段名

    表名:

       mysql:      

    SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='schemaName' and TABLE_NAME = 'tablename';

       oracle:

    select TABLE_NAME from tabs where TABLE_NAME = 'tableName'

       SqlServer:

    use t3d 
    select * from sysobjects where xtype='u' and status>=0

    字段名:

      mysql:  

    select * from information_schema.columns where table_schema='schema' and table_name='tableName'

      oracle:

    select * from user_tab_columns where table_name='tableName'

       SqlServer:

    use dbname 
    select name from syscolumns where id=object_id(N'tableName') order by colid
  • 相关阅读:
    文件路径与操作系统
    试验10
    shiyan9
    sql
    shiyan8
    iostream
    shiyan7
    CDMA
    试验6
    试验5
  • 原文地址:https://www.cnblogs.com/bluemaplestudio/p/4274464.html
Copyright © 2011-2022 走看看