一、创建数据库用户和授权
CREATE USER USER_NAME IDENTIFIED BY PASSWORD;
GRANT CONNECT,RESOURCE TO USER_NAME;
创建一个TEST密码TEST的用户
CREATE USER TEST IDENTIFIED BY TEST;
授予CONNECT和RESOURCE 权限
GRANT CONNECT,RESOURCE TO TEST;
连接数据库,CONN USER_NAME/PASSWORD;
CONN TEST/TEST;
断开连接,DISCONNECT USER_NAME;
DISCONNECT TEST;
二、创建DUAL表
CREATE TABLE DUAL(DUMMY VARCHAR2(1));
INSERT INTO DUAL VALUES('X');
三、SQL*PLUS小指令
1、显示当前连接用户
SHOW USER;
2、查看系统所有用户
SELECT * FROM ALL_USERS;
3、查看表结构
DESC TABLE_NAME;
CREATE USER USER_NAME IDENTIFIED BY PASSWORD;
GRANT CONNECT,RESOURCE TO USER_NAME;
创建一个TEST密码TEST的用户
CREATE USER TEST IDENTIFIED BY TEST;
授予CONNECT和RESOURCE 权限
GRANT CONNECT,RESOURCE TO TEST;
连接数据库,CONN USER_NAME/PASSWORD;
CONN TEST/TEST;
断开连接,DISCONNECT USER_NAME;
DISCONNECT TEST;
二、创建DUAL表
CREATE TABLE DUAL(DUMMY VARCHAR2(1));
INSERT INTO DUAL VALUES('X');
三、SQL*PLUS小指令
1、显示当前连接用户
SHOW USER;
2、查看系统所有用户
SELECT * FROM ALL_USERS;
3、查看表结构
DESC TABLE_NAME;