create table t_book(
id number(20) primary key not null,
bookName varchar(30),
price float(33),
author varchar(22),
bookTypeId varchar(22)
)
drop table t_book
select t.*,t.rowid from t_book t
delete from t_book where id=1
commit
id number(20) primary key not null,
bookName varchar(30),
price float(33),
author varchar(22),
bookTypeId varchar(22)
)
drop table t_book
select t.*,t.rowid from t_book t
delete from t_book where id=1
create sequence book_seq increment by 1 start with 1 nomaxvalue nocache; //nocache不使用缓存 nomaxvalue无最大值
insert into book values(book_seq.nextval,?,?,?)
drop sequence root;commit
本文介绍了一个关于数据库操作的例子,包括创建图书表、插入数据、删除特定记录等基本操作。此外,还展示了如何创建序列来自动生成唯一标识符。
3万+

被折叠的 条评论
为什么被折叠?



