| 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 10 for 4) from ·×»»µ¡ÍѸì; |
| 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 ¼ÆËã»úÊõÓï; |
| 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 ͪߩѦ¿ë¾î; |
| drop table test; |
| create table test (t text); |
| insert into test values('ENGLISH'); |
| insert into test values('FRANÇAIS'); |
| insert into test values('ESPAÑOL'); |
| insert into test values('ÍSLENSKA'); |
| insert into test values('ENGLISH FRANÇAIS ESPAÑOL ÍSLENSKA'); |
| vacuum test; |
| select * from test; |
| select * from test where t = 'ESPAÑOL'; |
| select * from test where t ~* 'espaÑol'; |
| select *,character_length(t) from test; |
| select *,octet_length(t) from test; |
| select *,position('L' in t) from test; |
| select *,substring(t from 3 for 4) from test; |