zoukankan      html  css  js  c++  java
  • Oracle删除所有表

    Oracle 清理用户所有的表

    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 SettingsAdministrator>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 SettingsAdministrator>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 SettingsAdministrator>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>
  • 相关阅读:
    (水题)洛谷
    (水题)洛谷
    洛谷
    (水题)洛谷
    POJ
    poj 3061(二分 or 尺取法)
    poj 2456(二分)
    poj 1064(二分答案)
    POJ 2559(单调栈)
    STL
  • 原文地址:https://www.cnblogs.com/dawnheaven/p/5481957.html
Copyright © 2011-2022 走看看