-
各种用于在Oracle中创建数据库和表的命令
资源介绍
表:db_action
create table db_action
(id number(4) PRIMARY KEY CONSTRAINT id_nn NOT NULL,act_name VARCHAR2(50),act_award_number number(4),act_info VARCHAR2(50),
act_data date);
插入表的记录:
insert into db_action values(testaction.nextval,'庆祝50周年',1000,'本次活是庆祝',TO_DATE('03-JAN-1990', 'dd-MON-yyyy'));
修改字段的名字:
SQL> alter table db_action rename column act_award_number to act_int_drop_number;
表:db_user 序列名字是:testuser;
create table db_user
(id number(4) PRIMARY KEY CONSTRAINT id_user NOT NULL,user_name VARCHAR2(16),user_pwd VARCHAR2(16),user_qx VARCHAR2(10),
user_intergral number(4),user_demo VARCHAR2(254));
插入表的记录;