您的位置:首页 > 数据库 > Oracle

oracle中实现主健自动生成

2010-05-19 11:09 369 查看
select * from fl2010_sample;

INSERT INTO zarvaclub.fl2010_sample (sameple_description, displayed_from, displayed_until, create_by)

VALUES ('adfsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

sssssssssssssssssssssssssssssssssssssssssssssssss

asdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

ffffffffff

sadffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaaaaaaaasadffffff

ffffffffffga

agssssssssssssss',to_date('21/01/2002 17:02:23','DD/MM/yyyy HH24:MI:SS'),

to_date('22/01/2002 07:02:23','DD/MM/yyyy HH24:MI:SS'),

'admin')

drop sequence zarvaclub.fl2010_sample_s

create sequence zarvaclub.fl2010_sample_s

minvalue 1

maxvalue 99

start with 1

INCREMENT BY 1

nocache

nocycle

create or replace trigger zarvaclub.fl2010_sample_idtr

before insert on zarvaclub.fl2010_sample for each row

begin

select to_number(fl2010_sample_s.nextval) into :new.id from dual;

end;

commit

如何改变列名

alter table fl2010_questions rename column DISPALY_UNTIL to DISPLAY_UNTIL

如果列名有空格,列名加双引号
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: