blob: 2e381f0f7ed126da9a4cd86818d7769d71b202a0 [file] [log] [blame]
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;