Home  >  Article  >  Database  >  oracle数据库中怎么查询自己建的表

oracle数据库中怎么查询自己建的表

WBOY
WBOYOriginal
2016-06-07 15:36:452421browse

select * from user_tables where table_name='ABC';可以查询出ABC但前提得是知道表名是ABC 可以根据表建时间不同,来将你本人建的表和数据库自动建的表分开,虽然他们都是同一个用户建的。 在user_table表里没有建表时间这一字段,可以用user_objects这个表

select * from user_tables where table_name='ABC';可以查询出ABC但前提得是知道表名是ABC

 

可以根据表建时间不同,来将你本人建的表和数据库自动建的表分开,虽然他们都是同一个用户建的。
在user_table表里没有建表时间这一字段,可以用user_objects这个表。
数据库系统建的表的时间和oracle发行版本有关,我的10.2.0.10版中这些都是2005-8-30建的,你本人建的表都大于这个时间。或者将范围缩更小些,找你最近两个月、一年建的表
具体的,如
select * from user_objects where object_type='TABLE' and create > sysdate-30;
select * from user_objects where object_type='TABLE' and create> to_date('2005-8-31','yyyy-mm-dd');

 

select * from all_tables;

Statement:
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