Wednesday, November 18, 2009
Wednesday, October 21, 2009
DDL - Data Definition Language
--create table
create table SCOTT.EMP_HOURLY( empno number(4) not null, ename varchar2(10), job varchar2(9), mgr number(4), hiredate date, hourdate number(5,2) default 6.5 not null , deptno number(2), constraint pk_emp_hourly primary key(empno));
--alter table
alter table scott.emp_hourly modify (hourdate number(5,2) default 7.25);
--rename table
alter table scott.emp_hourly rename to emp_hourly2;desc scott.emp_hourly
--drop table
drop table scott.emp_hourly2;desc scott.emp_hourly2
--truncate table
truncate table scott.emp2;
create table SCOTT.EMP_HOURLY( empno number(4) not null, ename varchar2(10), job varchar2(9), mgr number(4), hiredate date, hourdate number(5,2) default 6.5 not null , deptno number(2), constraint pk_emp_hourly primary key(empno));
--alter table
alter table scott.emp_hourly modify (hourdate number(5,2) default 7.25);
--rename table
alter table scott.emp_hourly rename to emp_hourly2;desc scott.emp_hourly
--drop table
drop table scott.emp_hourly2;desc scott.emp_hourly2
--truncate table
truncate table scott.emp2;
create table
create table SCOTT.EMP_HOURLY( empno number(4) not null, ename varchar2(10), job varchar2(9), mgr number(4), hiredate date, hourdate number(5,2) default 6.5 not null , deptno number(2), constraint pk_emp_hourly primary key(empno));
Subscribe to:
Posts (Atom)