oracle ×Ô¶¯Ôö³¤ÁÐ Àý×Ó
--´´½¨ÐòÁÐ
create sequence innerid
minvalue 1
maxvalue 999999999
start with 1
increment by 1
cache 20
order;
--´´½¨±í
create table users(
userid int primary key,
username varchar2(20),
userpwd varchar2(20)
);
select * from users;
insert into users values(innerid.nextval,'zhangsan','123');
insert into users values(innerid.nextval,'lisi','123');
insert into users values(innerid.nextval,'wangwu','123');
--´´½¨´¥·¢Æ÷
create or replace trigger users_id
before insert on users for each row
begin
select innerid.nextval into :new.userid from dual;
end users_id;
insert into users(username,userpwd) values('zhaoliu','123');
select * from users;
commit;
Ïà¹ØÎĵµ£º
--´´½¨Óû§
create user iagent identified by ia
--profile default
default tablespace users
temporary tablespace temp;
--account unlock;
--ɾ³ýÓû§
drop user iagent cascade;
--ÐÞ¸ÄÓû§ÃÜÂë
alter user iagent identified by ia;
--¸ø´´½¨µ ......
¾ßÌå²½Öè¾Í²»¶à˵ÁË £¬Òªµ¼³öµÄSQLSERVER±í½Ð LDJCUS£¬Ö÷¼ü Uid (int ×Ô¶¯Ôö³¤ÁÐ)£¬µ¼Èëµ½Oracle×ܱ¨´í£º¶ÔÏóÃûÎÞЧ £¬È¥µôÖ÷¼üÁоͿÉÒÔ£¬²»ÖªµÀΪʲô£¿ÄѵÀ×Ô¶¯Ôö³¤µÄÖ÷¼üÁоͲ»Äܵ¼Èëµ½OracleÖУ¿£¿£¿Òɻ󡣡£¡£¡£ ......
ÏÂÃæÊÇORACLEÐÐÁÐת»»Í¨Óô洢¹ý³Ì£º
1¡¢
Function Fun_Split_Str(p_Str Varchar2, p_Division Varchar2, p_Seq Int)
Return Varchar2 Is
v_First Int;
v_Last Int;
Begin
If p_Seq < 1 Then
&nbs ......
OracleʵÏÖ×ÔÔöÖ÷¼ü
oracleûÓÐORACLE×ÔÔö×Ö¶ÎÕâÑùµÄ¹¦ÄÜ£¬µ«ÊÇͨ¹ý´¥·¢Æ÷(trigger)ºÍÐòÁÐ(sequence)¿ÉÒÔʵÏÖ¡£
create table t_client (id number(4) primary key,
pid number(4) not null,
name varchar2(30) not null,
client_id varchar2(10),
client_level char(3),
bank_acct_no varchar2(30),
contact_tel&n ......
1.´´½¨²âÊÔ±í
create table users(
userid int primary key,
username varchar2(20),
userpwd varchar2(20)
);
insert into users values(1,'test','test');
insert into users values(2,'test','test');
insert into users values(3,'test','test');
insert into users values(4,'test','test');
insert i ......