如何判斷oracle是否安裝成功?
測(cè)試您是否可以連接到sqlplus:
原理:使用sqlplus登錄命令格式如:sqlplususername/password@globaldatabaseinstancename作為權(quán)限(NORMAL,SYSDBA,SYSOPER)進(jìn)入oracl:1158/
oracle怎么通過(guò)sql查看表的結(jié)構(gòu)?
用sql語(yǔ)句查詢(xún)表結(jié)構(gòu)的方法:
通過(guò)Oracle中的user_tab_cols、user_col_comments、user_constraints和user_cons_columns表進(jìn)行聯(lián)合查詢(xún)。_tab_cols用于獲取對(duì)應(yīng)用戶(hù)表的列信息;_col_comments用于獲取對(duì)應(yīng)用戶(hù)表列的注釋信息;_constraints用于獲取用戶(hù)表的約束;_cons_columns約束中用戶(hù)可訪問(wèn)的列。
示例代碼:
select_name,_name,_type,_length,,_id,,(SELECTCASEWHEN_namethatEN1other0ENDFROMDUAL)iskeyFROMuser_tab_colst,user_col_commentsc,(SELECT_nameFROMuser_constraints,user_columnsmWHERElower(_name)qh_outstoreseinfoand_name_nameand_name_typeP)mWHERElower(_name)qh_outstoreseinfoand_name_name_name_nameand_typet