您的位置:首页 > 数据库 > Oracle

oracle查询表名,不区分大小写

2009-12-14 20:36 232 查看
示例:

  

select table_name,tablespace_name,temporary from user_tables where table_name like '%PROV%'

  

分析:

  

table_name:表名(varchar2(30));
  

tablespace_name:存储表名的表空间(varchar2(30));
  

temporary:是否为临时表(varchar2(1))。
 

 

4种通配符的含义

  

% 表示零个或多个字符
  

_ 表示单个字符
  

[] 表示范围[a-f]或集合[abcdef]的任何单个字符
  

[^] 表示不属于指定范围的[a-f] 或集合[abcdef]的单个字符 通常表示[^a-f] or [^abcdef]

本文作者:未知

-----------------------------------------------以下为个人添加



如果想不区分大小,可以先将table_name先转成大写或小写,然后再根据相应格式查找,

如:

select table_name from user_tables where lower(table_name) like 'txp%';

select table_name from user_tables where upper(table_name) like 'TXP%';
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: