Oracle常用屬性,用法

2021-06-21 09:34:06 字數 781 閱讀 8475

create user t81 identified by t81  建立使用者   使用者名為t81;密碼為t81

create user adus identified by adus default tablespace users;

show user; 顯示當前使用者

grant create session,resource to t81;給使用者授權

conn t81/t81 切換使用者 使用者名稱/密碼

desc 表名 檢視表

drop table 表名; 刪除表

select * from 表名 檢視表裡的內容

commit;提交

insert into 表名 values(7,'第一會議室',to_date('1987-11-14 12:12:12','yyyy-mm-dd hh24:mi:ss'));插入

sql plus----- passw-舊密碼--新密碼-確認新密碼 修改密碼

exit 退出命令

create sequence t81_seq increment by 1 start with 100;建立序列從100開始每次增長1

create sequence t81_seq;建立序列

drop sequence t81_seq;刪除序列

select t81_seq.currval from dual; //檢視序列的當前值

select t81_seq.nextval from dual; //檢視序列的下乙個值

NSString常用屬性和用法

建立乙個字串物件 nsstring str1 www.hello.txt nslog str1 用格式化字串初始化 int a 123 nsstring str2 nsstring alloc initwithformat d a,str1 nslog str2 快速建立乙個字串常量 nsstrin...

Oracle常用函式Trunc用法

trunc date,yyyy 返回當年的第一天 trunc date,mm 返回當月的第一天 trunc date,d 返回當前星期的第一天 trunc date,dd 返回當前的年月日 decimals 保留number點後面的位數 trunc 100.123,2 100.12 decimals...

oracle常用的符號用法

用於給某個變數賦值 declare ii number begin ii 2 dbms out.put line ii end 變數 表示繫結變數 在plsql或者sql中使用的 常用的繫結變數 比如在觸發器的 new和 old 建立乙個繫結變數 是sql命令 必須在dos中執行 var ii nu...