PLSQL中执行语句

select 'drop '||object_type||' '||object_name||';' from user_objects;

结果集是所有的删除表语句,将查询结果保存为clear.sql

在sql>提示符下@clear.sql 执行该脚本

SQL*Plus 登录

1.直接敲sqlplus并回车就是启动SQL*PLUS,输入user及password将使用户登陆到缺省的数据库

C:\Documents and Settings\Administrator>sqlplus 

SQL*Plus: Release 9.2.0.1.0 - Production on 

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved. 

请输入用户名: 

2.sqlplus user/password@SERVICE_NAME将连接到指定的数据库

C:\Documents and Settings\Administrator>sqlplus dbusername/password@SERVICE_NAME
SQL*Plus: Release 9.2.0.1.0 - Production on 

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved. 

连接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production 

SQL> 

3.但如果敲 sqlplus /nolog就是使SQL*PLUS启动,但不登陆Oracle数据库。然后需要使用connect命令连接Oracle

C:\Documents and Settings\Administrator>sqlplus /nolog 

SQL*Plus: Release 9.2.0.1.0 - Production on 

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved. 

SQL> connect dbusername/password@SERVICE_NAME
已连接。
SQL>

相关文章:

  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2021-08-01
  • 2021-07-01
  • 2021-06-24
猜你喜欢
  • 2022-12-23
  • 2021-10-18
  • 2021-12-16
  • 2021-11-16
  • 2022-12-23
  • 2021-12-09
相关资源
相似解决方案