(1)得到表中所有的字段
select * from user_tab_columns where table_name='表名'
(2)复制表
create table user_temp as select * from user
(3)关联排序:当一个表的排序字段要自定义排序,而这个自定义的顺序在另一张表时
select name from t_user order by (select min(order) from order where order.name=name)
(4)删除dataid重复的数据
delete table1 where rowid not in (select max(rowid) from table1 group by (data_id))
(5)数据恢复
(6)decode的使用
decode (zt,'0','未审批','已审批')