Oracle基本sql操作

时间:2024-05-28 20:36:14

1.查询用户下的所有表

查询用户下的所有表 select distinct table_name from user_tab_columns;

2.搜索出前N条记录

Select a.*,rownum from (select * from cardkind order by cardkind ) a where rownum<n

3.快速做一个和原表一样的备份表

create table new_table as (select * from old_table);

4.查询数据库有多少表

select * from all_tables;