oracle 查看表是否存在、包含某字段的表、表是否包含字段

表是否存在:
  select count(*) from user_tables where table_name = #{tablename}

包含某个字段的表
  select *
    from user_tab_columns
  where UPPER(column_name)='CREATE_TIME'

特定表是否包含字段
  select *
    from user_tab_columns

  where UPPER(column_name)='CREATE_TIME' AND TABLE_NAME = 'SYS_USERLOG'

posted @ 2018-07-31 15:19  泛舟青烟  阅读(1063)  评论(0编辑  收藏  举报