Sql for Oracle基本操作关键字 +SQL TOP子句 TOP 子句用于规定要返回的记录的数目 SELECT column_name(s) FROM table_name WHERE ROWNUM <= number +SQL LIKE 操作符 LIKE 操作符用于在 WHERE 子句中搜索列中的指定模式 SELECT column_name(s) FROM table_name WHERE column_name LIKE pattern 提示:"%" 可用于定义通配
登入oraclesqlplus / as sysdba启动oraclestartup停止oracleshutdown 创建新用户create user username identified by password;创建表空间create tablespace tablespacename datafile '/mnt/nfs/oracle_db/test.dbf'size 50m;给用户指定默认表空间alter user username default tablespace tables
--创建一个accout账户表 CREATE TABLE account( id ) NOT NULL, recommender_id ), login_name ) NOT NULL, login_passwd ) NOT NULL, status ) NOT NULL, create_date DATE DEFAULT SYSDATE, pause_date DATE, close_date DATE, real_name ) NOT NULL, idcard_no ) NOT NULL,
--创建表空间 create tablespace test datafile 'c:\test.dbf' size 100m autoextend on next 10m; --删除表空间 drop tablespace test; --创建用户 create user test identified by test default tablespace test; --给用户授权 --oracle数据库中常用角色 connect--连接角色,基本角色 resource--开发者角色 dba-