Oracle新增用戶新建表插入數據


  1、用sysdba登陸sqlplus:

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 12月 9 13:05:47 2020

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

請輸入用戶名:  /as sysdba

連接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

  2、新建用戶:

SQL> create user wlf identified by wlf;

用戶已創建。

SQL> select username,user_id,account_status,default_tablespace,temporary_tablespace from dba_users where username='WLF';

USERNAME                                                        USER_ID
------------------------------------------------------------ ----------
ACCOUNT_STATUS
----------------------------------------------------------------
DEFAULT_TABLESPACE
------------------------------------------------------------
TEMPORARY_TABLESPACE
------------------------------------------------------------
WLF                                                                  85
OPEN
USERS
TEMP

 

  3、賦予權限:

SQL> grant dba to wlf;

授權成功。

 

  4、退出,重新登陸新用戶:

SQL> exit;
從 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 斷開

E:\BaiduNetdiskDownload>sqlplus wlf/wlf

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 12月 9 14:09:13 2020

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

  

  5、新建表:

SQL> create table t_wlf_component_template(
  2  id number(9) not null,
  3  title varchar2(20)
  4  );

表已創建。

 

  6、插入數據:

SQL> insert into t_wlf_component_template values(1,'hello world');

已創建 1 行。

 

  7、別忘了提交:

SQL> commit;

提交完成。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM