查询当前数据库下的所有表(用户名要大写)
select * from all_tables where owner = 'DDW' and table_name = 'T_CLASS'
查询当前登录用户的所有表
select * from user_tables where table_name = 'T_CLASS'
或者
select * from tabs where table_name = 'T_CLASS'
查询所有用户的表,视图等
select * from all_tab_comments where owner = 'DDW' and table_type='TABLE' and comments like '%%'
查询本用户的表,视图等
select * from user_tab_comments where table_name = 'T_CLASS' and table_type='TABLE' and comments like '%%'
查询所有用户的表的列名和注释
select * from all_col_comments where owner = 'DDW' and table_name='T_CLASS'
查询本用户的表的列名和注释
select * from user_col_comments where table_name='T_CLASS'
查询所有用户的表的列名等信息
select * from all_tab_columns where owner = 'DDW' and table_name='T_CLASS' and nullable ='N'
查询本用户的表的列名等信息
select * from user_tab_columns where table_name='T_CLASS' and nullable ='N'
查询前100条记录
select * from user_tables where rownum < 101
时间格式转换
select * from t_user where TO_CHAR(CREATED_TIME,'yyyy-mm-dd HH24:MI:SS') = '2022-07-29 17:03:39'
update t_user set CREATED_TIME=TO_DATE('2022-07-29 17:03:39','yyyy-mm-dd HH24:mi:ss')