乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      查詢 mysql,oracle 注釋

       soft_xiang 2011-01-25
      mysql:
       

      ##查詢表中列的注釋信息

      select * from information_schema.columns

      where table_schema = 'db'  #表所在數(shù)據(jù)庫

      and table_name = 'tablename'  #你要查的表
       

      #只查詢列名和注釋

      select  column_name, column_comment from information_schema.columns where table_schema ='db'  and table_name = 'tablename' 


      #查看表的注釋

      select table_name,table_comment from information_schema.tables  where table_schema = 'db' and table_name ='tablename'
       
      Oracle:

      查詢表字段明細(xì)

      select column_name,data_type,data_length,DATA_PRECISION ,DATA_SCALE 
      from all_tab_columns where table_name='tablename'

      字段注釋

      select   *   from   user_col_comments;

      表注釋

      select   *   from   user_tab_comments;

      表明細(xì)+表注釋+字段明細(xì)+字段注釋

      select ATC.OWNER,atC.TABLE_NAME,utc.comments,ATC.COLUMN_NAME,ATC.DATA_TYPE,ATC.DATA_LENGTH,ATC.NULLABLE, ucc.comments from

      (select ATC.OWNER,atC.TABLE_NAME,ATC.COLUMN_NAME,ATC.DATA_TYPE,ATC.DATA_LENGTH,ATC.NULLABLE
      from all_tab_columns ATC where ATC.owner in (用戶名1,用戶名2........) ) atc

      left outer join user_col_comments ucc on atc.table_name=ucc.table_name and atc.column_name=ucc.column_name

      left outer join user_tab_comments utc on atc.table_name=utc.table_name

      order by atc.table_name,atc.column_name;

        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多