OCM實驗-建立含特殊欄位型別的表

super_sky發表於2014-01-28

建立具有ROWID及時間戳型別欄位的表並插入資料.這個實驗很簡單

首先,我們需要建一個具有rowid 以及時間戳欄位的表

TESTDB@PROD>create table t1 (text rowid,insert_time timestamp with local time zone);

Table created.

其次,向該表中插入一些資料

TESTDB@PROD>insert into t1 select rowid,current_timestamp from t where rownum < 200;

199 rows created.

查詢表中資料

TESTDB@PROD>select * from t1;

TEXT               INSERT_TIME
------------------ ---------------------------------------------------------------------------
AAADB+AAIAAAAAUAAA 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAB 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAC 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAD 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAE 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAF 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAG 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAH 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAI 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAJ 28-JAN-14 09.10.55.882652 AM
AAADB+AAIAAAAAUAAK 28-JAN-14 09.10.55.882652 AM

TEXT               INSERT_TIME
------------------ ------------------------------

這個實驗相對簡單很多了。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11590946/viewspace-1076122/,如需轉載,請註明出處,否則將追究法律責任。

相關文章