SQL常用函数

1)upper

将字符串中小写的字母替换成大写的

DB2的使用:

select * from SYSIBM.SYSCOLUMNS where name = upper('columnName');

MySQL中的使用,(MySQL默认是忽略大小写的,这里只做一个测试)

select * from information_schema.COLUMNS where COLUMN_NAME = upper('price');

 2)lower(string) 将string中的大写字母转换成小写字母

DB2中查找tbname为T_L_DOC_LIKE表名的表。

select * from SYSIBM.SYSCOLUMNS where tbname = upper('t_l_doc_like');

 

posted @ 2017-11-26 17:08  dingcx2013  阅读(109)  评论(0编辑  收藏  举报