資料庫中查詢區分大小寫

2021-04-01 15:20:54 字數 2024 閱讀 7164

oracle中語句:

同時轉換為大寫

select * from tablename where upper(字段)=upper(查詢內容)

同時轉換為小寫

select * from tablename where lower(字段)=lower(查詢內容)

模糊查詢:select .. from tab_name where upper(col_name) like '%abc%';

select .. from tab_name where lower(col_name) like '%abc%';

在sql2000和7.0的查詢語句中,區分大寫的查詢方法

--就是在欄位名後加 collate chinese_prc_cs_as_ws

--查詢

--1.查大寫字母

select * from 表

where fd collate chinese_prc_cs_as_ws like '%a%' 

--就是在欄位名後加 collate chinese_prc_cs_as_ws

--2.查全形

select * from 表

where fd collate chinese_prc_cs_as_ws like '%a%'

--3.查半形

select * from 表

where fd collate chinese_prc_cs_as_ws like '%,%'

在sql2000和7.0的查詢語句中,區分大寫的查詢方法

--就是在欄位名後加 collate chinese_prc_cs_as_ws

--查詢

--1.查大寫字母

select * from 表

where fd collate chinese_prc_cs_as_ws like '%a%' 

--就是在欄位名後加 collate chinese_prc_cs_as_ws

--2.查全形

select * from 表

where fd collate chinese_prc_cs_as_ws like '%a%'

--3.查半形

select * from 表

where fd collate chinese_prc_cs_as_ws like '%,%'

在sql2000和7.0的查詢語句中,區分大寫的查詢方法

--就是在欄位名後加 collate chinese_prc_cs_as_ws

--查詢

--1.查大寫字母

select * from 表

where fd collate chinese_prc_cs_as_ws like '%a%' 

--就是在欄位名後加 collate chinese_prc_cs_as_ws

--2.查全形

select * from 表

where fd collate chinese_prc_cs_as_ws like '%a%'

--3.查半形

select * from 表

where fd collate chinese_prc_cs_as_ws like '%,%'

在sql2000和7.0的查詢語句中,區分大寫的查詢方法

--就是在欄位名後加 collate chinese_prc_cs_as_ws

--查詢

--1.查大寫字母

select * from 表

where fd collate chinese_prc_cs_as_ws like '%a%' 

--就是在欄位名後加 collate chinese_prc_cs_as_ws

--2.查全形

select * from 表

where fd collate chinese_prc_cs_as_ws like '%a%'

--3.查半形

select * from 表

where fd collate chinese_prc_cs_as_ws like '%,%'

查詢區分大小寫

在sql2000和7.0的查詢語句中,區分大寫的查詢方法 sql2000,就用下面的方法.就是在欄位名後加 collate chinese prc cs as ws 區分大小寫 全半形字元的方法 測試資料 create table 表 fd varchar 10 insert into 表 sele...

查詢區分大小寫

在sql2000和7.0的查詢語句中,區分大寫的查詢方法 sql2000,就用下面的方法.就是在欄位名後加 collate chinese prc cs as ws 區分大小寫 全半形字元的方法 測試資料 create table 表 fd varchar 10 insert into 表 sele...

查詢區分大小寫

在sql2000和7.0的查詢語句中,區分大寫的查詢方法 sql2000,就用下面的方法.就是在欄位名後加 collate chinese prc cs as ws 區分大小寫 全半形字元的方法 測試資料 create table 表 fd varchar 10 insert into 表 sele...