[20131121]12c sqlplus的set colinvisible on.txt
[20131121]12c sqlplus的set colinvisible on.txt
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-777179/,如需轉載,請註明出處,否則將追究法律責任。
12c 加入invisible column,但是如果要檢視錶的隱含列,要查詢一些檢視.實際上在sqlplus執行set colinvisible on,在執行desc 就可以看到隱含列.
做一個測試看看.
@ver
BANNER CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
SQL> create table t ( a number,b number,c number);
Table created.
SQL> desc t;
Name Null? Type
----- -------- --------
A NUMBER
B NUMBER
C NUMBER
SQL> column column_name format a20
SQL> select column_id, segment_column_id, internal_column_id, column_name, hidden_column, virtual_column from user_tab_cols where table_name = 'T';
COLUMN_ID SEGMENT_COLUMN_ID INTERNAL_COLUMN_ID COLUMN_NAME HID VIR
---------- ----------------- ------------------ -------------------- --- ---
3 3 3 C NO NO
2 2 2 B NO NO
1 1 1 A NO NO
--如果隱藏列.
SQL> alter table t modify b invisible;
Table altered.
SQL> desc t
Name Null? Type
----- -------- ---------------------------
A NUMBER
C NUMBER
SQL> select column_id, segment_column_id, internal_column_id, column_name, hidden_column, virtual_column from user_tab_cols where table_name = 'T';
COLUMN_ID SEGMENT_COLUMN_ID INTERNAL_COLUMN_ID COLUMN_NAME HID VIR
---------- ----------------- ------------------ -------------------- --- ---
2 3 3 C NO NO
2 2 B YES NO
1 1 1 A NO NO
SQL> select column_id, column_name from user_tab_columns where table_name='T';
COLUMN_ID COLUMN_NAME
---------- --------------------
1 A
B
2 C
--要查詢對應的檢視才知道.
SQL> set colinvisible on
SQL> desc t
Name Null? Type
-------------- -------- ----------
A NUMBER
C NUMBER
B (INVISIBLE) NUMBER
--修改為可見.
SQL> alter table t modify b visible;
Table altered.
SQL> select column_id, segment_column_id, internal_column_id, column_name, hidden_column, virtual_column from user_tab_cols where table_name = 'T';
COLUMN_ID SEGMENT_COLUMN_ID INTERNAL_COLUMN_ID COLUMN_NAME HID VIR
---------- ----------------- ------------------ -------------------- --- ---
2 3 3 C NO NO
3 2 2 B NO NO
1 1 1 A NO NO
SQL> desc t
Name Null? Type
----- -------- -------
A NUMBER
C NUMBER
B NUMBER
--可以發現顯示順序COLUMN_ID發生了變化,但是儲存順序 SEGMENT_COLUMN_ID並沒有改變. INTERNAL_COLUMN_ID保持開始建立的順序.
最新文章
相關文章
- [20120106]11G sqlplus set errorloging on.txtSQLError
- sqlplus set命令SQL
- sqlplus set命令使用SQL
- Sqlplus下的set命令詳解SQL
- sqlplus常用set指令(轉)SQL
- cmd_sqlplus:set head off and set head onSQL
- SQLPLUS之set常用設定SQL
- Oracle 12c Rac Set Archive ModeOracleHive
- sqlplus 環境下部分set 命令SQL
- PLSQL Developer_v7_sqlplus:set head off and set head onSQLDeveloper
- sqlplus_set describe linenumSQL
- oracle 10g sqlplus_set sqlprompt之妙用_ztOracle 10gSQL
- sqlplus : set autot traceonly vs pl/sql developer : F5SQLDeveloper
- [20141216]sqlplus的set appinfo.txtSQLAPP
- Oracle 12C 新特性之 sqlplus檢視History命令OracleSQL
- [20190215]sqlplus set arraysize.txtSQL
- 【OH】SET System Variable Summary SQLPLUS 系統變數設定SQL變數
- [20130814]12c sqlplus.txtSQL
- [20221203]sqlplus set trimspool 問題.txtSQL
- [20170916]sqlplus set array最小2補充.txtSQL
- [20120410] sqlplus中set termout off.txtSQL
- 12c data guard 使用 sqlplus 主備切換最佳實踐SQL
- [20221202]sqlplus set trimout 問題.txtSQL
- Oracle 12C R2-新特性-SQLPLUS提供檢視歷史命令的功能OracleSQL
- [20131121]奇怪的執行計劃變化.txt
- [20181109]12c sqlplus rowprefetch引數5SQL
- [20210119]sqlplus 12c LOBPREFETCH.txtSQL
- [20181122]18c sqlplus set linesize.txtSQL
- [20120109]sqlplus 與set longchunksize 設定問題.txtSQLGC
- [20181109]12c sqlplus rowprefetch引數5.txtSQL
- [20181108]12c sqlplus rowprefetch引數4.txtSQL
- [20181106]12c sqlplus rowprefetch引數3.txtSQL
- Vue.set與vue.$set的使用Vue
- sqlplus的使用SQL
- alter system set event和set events的區別
- sqlplus login -- SP2-0750: You may need to set ORACLE_HOME to your Oracle software directorySQLOracle
- [20200824]12c sqlplus rowprefetch arraysize 顯示行數量的關係.txtSQL
- 如何在solaris的oracle sqlplus中使用sqlplusOracleSQL