Home > Database > Mysql Tutorial > Oracle如何删除某个用户下的所有表

Oracle如何删除某个用户下的所有表

WBOY
Release: 2016-06-07 15:30:49
Original
3098 people have browsed it

http://www.itpub.net/thread-762849-1-1.html 1.以sys as sysdba 身份登录。运行下面的语句。'username'为要删表的用户名。 SELECT 'DROP TABLE ' || 'username' ||'.'|| TABLE_NAME|| ' CASCADE CONSTRAINTS;' FROM DBA_ALL_TABLES WHERE OWNER='username'


http://www.itpub.net/thread-762849-1-1.html


1.以sys as sysdba 身份登录。运行下面的语句。'username'为要删表的用户名。

SELECT 'DROP TABLE ' || <span>'username'</span><span>||'.'|| TABLE_NAME|| ' CASCADE CONSTRAINTS;' FROM DBA_ALL_TABLES WHERE OWNER='username'</span>
Copy after login


执行后生成一个SQL语句集。将SQL语句拷出。贴到新开的SQL窗口。执行后该用户下的表便被删除了。





Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template