练习1:
create table employee(
id number(4) not null,
name varchar2(20) not null,
gender char(1) default 'M',
birth date,
salary number(6,2),
comm number(6,2),
job varchar2(30),
manager number(4),
deptno number(2)
);
练习2:
rename employee to myemp;
alter table myemp add(
hiredate date default sysdate
);
alter table myemp modify(
job varchar2(30) default 'cleck'
);
alter table myemp drop(hiredate);
练习3:
insert into myemp(id,name,job,salary) values(1001,'rose','PROGRAMMER',5500);
insert into myemp(id,name,job,birth) values(1002,'martha','ANALYST','01-9月-89');
insert into myemp(id,name,job,birth) values(1003,'donna','MANAGER',to_date('1978-09-01','YYYY-MM-DD'));
练习4:
update myemp set salary=8500 where name='rose';
update myemp set salary=6500,job='ANALYST' where id=1003;
练习5:
delete from myemp where job is null;
delete from myemp where salary is null;
delete from myemp where name='rose';