建立表:
CREATE TABLE t1(
empno NUMBER(5) PRIMARY KEY,
ename VARCHAR2(15) NOT NULL,
job VARCHAR2(10), mgr NUMBER(5),
hiredate DATE DEFAULT (sysdate),
sal NUMBER(7,2),
comm NUMBER(7,2)
);
建立表T2并指定此表的表空间为test1:
CREATE TABLE t2(
empno NUMBER(5) PRIMARY KEY,
ename VARCHAR2(15) NOT NULL,
job VARCHAR2(10),
mgr NUMBER(5),
hiredate DATE DEFAULT (sysdate),
sal NUMBER(7,2),
comm NUMBER(7,2)
) TABLESPACE test1;
插入记录:insert into t1 values(101,'wang','it',25,'',20,20);
显示一个表的结构
SQL> desc table_name