# Common ###### tags: `Oracle` `SQL` select userenv('language') from dual; //判斷使用語言 select lengthb('你') from dual; 建議命名規則 程序變數 V_NAME 程序常量 C_NAME 游標變數 Cursor_NAME 異常標示 E_NAME 表類型 NAME_TABLE_TYPE 表 NAME_TABLE 紀錄類型 NAME_RECORD SQL*PLUS替代變數 P_NAME 綁定變數 G_NAME 定義變數 test tablename.col%type //test = table.col_type 定義變數 test tablename%rowtype //test = table表結構 %type %rowtype 雖然好用但每次使用時系統會去查看schema造成一定開銷且若欄位刪除了可能會沒有同步更新到 SYS.ALL_TAB_COLUMNS 存所有表/欄位定義 ALL_OBJECTS describes all objects accessible to the current user ALL_SOURCE 可查物件語法 紀錄TABLE相關資訊 user_tab_columns user_col_comments
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up