oracle grant 语句的GRANT privilige TO user IDENTIFIED BY password 语法

在D:oracleproduct10.2.0db_1RDBMSADMINutlsampl.sql下,有如下的语句:
DROP USER SCOTT CASCADE;
DROP USER ADAMS CASCADE;
DROP USER JONES CASCADE;
DROP USER CLARK CASCADE;
DROP USER BLAKE CASCADE;
GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO SCOTT IDENTIFIED BY TIGER;
DROP PUBLIC SYNONYM PARTS;

CONNECT SCOTT/TIGER

CREATE TABLE DEPT
(DEPTNO NUMBER(2) CONSTRAINT PK_DEPT PRIMARY KEY,
DNAME VARCHAR2(14) ,
LOC VARCHAR2(13) ) ;

这个GRANT privilige TO user IDENTIFIED BY password 语法,其实是会创建user用户并且设置其密码为password,请参考oracle官方的sql reference:

IDENTIFIED BY Clause

Use the IDENTIFIED BY clause to specifically identify an existing user by password or to create a nonexistent user. This clause is not valid if the grantee is a role or PUBLIC. If the user specified in the grantee_clause does not exist, then the database creates the user with the password and with the privileges and roles specified in this clause.

[@more@]

请使用浏览器的分享功能分享到微信等