查看表结构:desc tablename
创建表:create table student(xh number(4) primary key,xm varchar2(20),sex char(2),birthday date,jxj number(7,2));
添加字段:alter table student add(classid number(2));
修改字段长度:alter table student modify(xm varchar2(30));
删除字段:alter table student drop column jxj;
修改表名字:alter table to stu;
删除表:drop table student;
修改日期格式:alter session set nls_date_format='yyyy-mm-dd';
删除表数据:delete form student;(删除速度慢,因为要写日志,还可以恢复数据)
设置保存点:savepoint a;
回滚到保存点:rollback to a;
删除表数据:truncate table student;不可以恢复数据,删除速度快,不写日志