blob: cf9e07fd1c6d03f6551f058f22375cccfdd2acd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
drop table ͪߩѦ¿ë¾î;
create table ͪߩѦ¿ë¾î (¿ë¾î text, ÝÂ×¾ÄÚµå varchar, ºñ°í1A¶ó±¸ char(16));
create index ͪߩѦ¿ë¾îindex1 on ͪߩѦ¿ë¾î using btree (¿ë¾î);
create index ͪߩѦ¿ë¾îindex2 on ͪߩѦ¿ë¾î using hash (ÝÂ×¾ÄÚµå);
insert into ͪߩѦ¿ë¾î values('ÄÄÇ»Å͵ð½ºÇ÷¹ÀÌ', 'ѦA01ß¾');
insert into ͪߩѦ¿ë¾î values('ÄÄÇ»Åͱ׷¡ÇȽº', 'ÝÂB10ñé');
insert into ͪߩѦ¿ë¾î values('ÄÄÇ»ÅÍÇÁ·Î±×·¡¸Ó', 'ìÑZ01ù»');
vacuum ͪߩѦ¿ë¾î;
select * from ͪߩѦ¿ë¾î;
select * from ͪߩѦ¿ë¾î where ÝÂ×¾ÄÚµå = 'ìÑZ01ù»';
select * from ͪߩѦ¿ë¾î where ÝÂ×¾ÄÚµå ~* 'ìÑz01ù»';
select * from ͪߩѦ¿ë¾î where ÝÂ×¾ÄÚµå like '_Z01_';
select * from ͪߩѦ¿ë¾î where ÝÂ×¾ÄÚµå like '_Z%';
select * from ͪߩѦ¿ë¾î where ¿ë¾î ~ 'ÄÄÇ»ÅÍ[µð±×]';
select * from ͪߩѦ¿ë¾î where ¿ë¾î ~* 'ÄÄÇ»ÅÍ[µð±×]';
select *,character_length(¿ë¾î) from ͪߩѦ¿ë¾î;
select *,octet_length(¿ë¾î) from ͪߩѦ¿ë¾î;
select *,position('µð' in ¿ë¾î) from ͪߩѦ¿ë¾î;
select *,substring(¿ë¾î from 3 for 4) from ͪߩѦ¿ë¾î;
|