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;

提交完成。
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值