SQL的类型:
1. DML(Data Manipulation Lanauage 数据操作语言): insert update delete select
2. DDL(Data Definition Language 数据定义语言): create table, drop table, alter table
truncate table
create view,drop view
create sequence,drop....
3. DCL(Data Control Language 数据控制语言): commit rollback
delete和truncate区别:
1. delete逐条删除,truncate先摧毁表,再重建
2. delete可能产生碎片;truncate不会
3. delete不会释放空间;truncate会释放空间
4. delete可以被闪回;truncate不可以
rowid:伪列 行地址
rownum:不会改变的
select rowid,rownum, empno,ename from emp;
授权:
C:\>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 4月 2 13:47:21 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show user;
USER 为 "SYS"
SQL> grant create view to scott;
授权成功。
SQL>