blob: 7cd0b9b0e25b391df00aa40b96d0aeed5771509d [file] [log] [blame]
drop table ¼ÆËã»úÊõÓï;
create table ¼ÆËã»úÊõÓï(ÊõÓï text, ·ÖÀàºÅ varchar, ±¸×¢1A char(16));
create index ¼ÆËã»úÊõÓïindex1 on ¼ÆËã»úÊõÓï using btree(ÊõÓï);
create index ¼ÆËã»úÊõÓïindex2 on ¼ÆËã»úÊõÓï using btree(·ÖÀàºÅ);
insert into ¼ÆËã»úÊõÓï values('µçÄÔÏÔʾÆÁ','»úA01ÉÏ');
insert into ¼ÆËã»úÊõÓï values('µçÄÔͼÐÎ','·ÖB01ÖÐ');
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 ¼ÆËã»úÊõÓï;