当前位置:Gxlcms > 数据库问题 > sqlplus

sqlplus

时间:2021-07-01 10:21:17 帮助过:2人阅读

*Plus: Release 11.2.0.1.0 Production on Mon Jun 5 10:35:05 2017 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> show user USER is "SYS" SQL> View Code

sys 在oracle中最高权限

解锁scott

alter user scott identified by  tiger account unlock;

scott 用户下有几张表

select * from tab;

连接符的用法:用查询生成批量操作的命令

select ‘drop table ‘||tname||‘;‘ from tab;

技术分享
SQL> select drop table ||tname||; from tab;

DROPTABLE||TNAME||;
------------------------------------------
drop table BONUS;
drop table DEPT;
drop table EMP;
drop table SALGRADE;

SQL> select * from tab;

TNAME                   TABTYPE    CLUSTERID
------------------------------ ------- ----------
BONUS                   TABLE
DEPT                   TABLE
EMP                   TABLE
SALGRADE               TABLE

SQL> 
View Code

 

sqlplus

标签:nbsp   partition   res   close   ora   rom   tab   bsp   --   

人气教程排行