Records
来源:互联网 发布:js获取button的value 编辑:程序博客网 时间:2024/05/18 02:06
SQL> drop table myoracle;
表已删除。
SQL> create table zuser (id number(4) primary key, fn char(10), sn char(10));
表已创建。
SQL> create sequence seq_zid
2 minvalue 1
3 nomaxvalue
4 start with 1
5 increment by 1
6 nocycle
7 nocache;
序列已创建。
SQL> create or replace trigger tg_zid
2 before insert on zuser for each row when (new.id is null)
3 begin select seq_zid.nextval into:new.id from dual;
4 end;
5 /
触发器已创建
SQL> show err;
SQL> select seq_zid.nextval from dual;
NEXTVAL
----------
1
SQL> select seq_zid.currval from dual;
CURRVAL
----------
1
SQL> desc dual
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
DUMMY VARCHAR2(1)
SQL> select * from all_sequences where lower(SEQUENCE_NAME) like '%seq_zid%';
SQL> select * from dba_objects where lower(object_name) = 'dual';
开始使用SQL DEVELOPER
ALTER SEQUENCE seq_zid increment by -1;
ALTER SEQUENCE seq_zid MINVALUE 0;
SELECT seq_zid.nextval FROM dual;
ALTER SEQUENCE seq_zid increment by 1;
ALTER SEQUENCE seq_zid MINVALUE 1;
INSERT INTO zuser VALUES (null,'Zheng','Yan');
ID FN SN
---------------------- ---------- ----------
1 Zheng Yan
alter table zuser drop constraint SYS_C009773;
alter table zuser add constraint pk_id primary key (id);
select * from dba_constraints where lower(table_name) = 'zuser';
alter table zuser add (salary number);
update zuser set salary = 1000+ mod(id,3)*100;
select avg(salary) avg, sum(salary) sum, max(salary) max, min(salary) min from zuser;
select fn,salary, count(*) "# Cost" from zuser group by fn, salary;
define a = 'Zheng';
select * from zuser where upper(fn) = upper('&a'); --一般字符和日期类型要加单引号
- Records
- Records
- moss records
- Audit Records
- some records
- temp records
- records.config
- theano records
- Bug records
- S-Records & Intel-HEX
- USA English Words Records.
- Super PI Records
- DBA_OUTSTANDING_ALERT records alerts
- About Audit Records
- 2008.10.30's records
- 删除重复的records
- 遍历records中的数据
- Qt book read records
- VM
- 使用代理model QSortFilterProxyModel进行item筛选和排序
- win7 下实现 linux 的鼠标模式:Focus Follows Mouse
- SQL_Oracle数据类型简介
- How to do the TM symbol in HTML
- Records
- asp.net验证不区分大小写
- Server2003 DNS服务配置篇
- sun.net.ftp.FtpClient的函数说明
- postgreSql 中文排序
- sed 用法简介
- cygwin 在 win7 下打开 Xserver 的时候,Xterm(rxvt) 老是报错
- version GCC_3 not defined
- gxt:ext-gwt 搭建