1
drop table ��ג�������ђ��;
2
create table ��ג�������ђ�� (��ђ�� text, �ʬ������������ varchar, ������1A������ char(16));
3
create index ��ג�������ђ��index1 on ��ג�������ђ�� using btree (��ђ��);
4
create index ��ג�������ђ��index2 on ��ג�������ђ�� using hash (�ʬ������������);
5
insert into ��ג�������ђ�� values('������Ԓ�咡������ǒ�������ג�쒥�','���A01���');
6
insert into ��ג�������ђ�� values('������Ԓ�咡���������钥Ւ����Ò�����','�ʬB10���');
7
insert into ��ג�������ђ�� values('������Ԓ�咡������ג�풥���钥ޒ��','���Z01���');
9
select * from ��ג�������ђ��;
10
select * from ��ג�������ђ�� where �ʬ������������ = '���Z01���';
11
select * from ��ג�������ђ�� where �ʬ������������ ~* '���z01���';
12
select * from ��ג�������ђ�� where �ʬ������������ like '_Z01_';
13
select * from ��ג�������ђ�� where �ʬ������������ like '_Z%';
14
select * from ��ג�������ђ�� where ��ђ�� ~ '������Ԓ�咡����[��ǒ��]';
15
select * from ��ג�������ђ�� where ��ђ�� ~* '������Ԓ�咡����[��ǒ��]';
16
select *,character_length(��ђ��) from ��ג�������ђ��;
17
select *,octet_length(��ђ��) from ��ג�������ђ��;
18
select *,position('���' in ��ђ��) from ��ג�������ђ��;
19
select *,substring(��ђ�� from 10 for 4) from ��ג�������ђ��;
20
drop table ��Ƒ�㑻�������;
21
create table ��Ƒ�㑻�������(������ text, ��֑����� varchar, ����ע1A char(16));
22
create index ��Ƒ�㑻�������index1 on ��Ƒ�㑻������� using btree(������);
23
create index ��Ƒ�㑻�������index2 on ��Ƒ�㑻������� using btree(��֑�����);
24
insert into ��Ƒ�㑻������� values('����ԑ�ԑʾ���','���A01���');
25
insert into ��Ƒ�㑻������� values('����ԑͼ���','���B01���');
26
insert into ��Ƒ�㑻������� values('����ԑ�̑��Ա','���Z01���');
28
select * from ��Ƒ�㑻�������;
29
select * from ��Ƒ�㑻������� where ��֑����� = '���Z01���';
30
select * from ��Ƒ�㑻������� where ��֑����� ~* '���z01���';
31
select * from ��Ƒ�㑻������� where ��֑����� like '_Z01_';
32
select * from ��Ƒ�㑻������� where ��֑����� like '_Z%';
33
select * from ��Ƒ�㑻������� where ������ ~ '�����[��ԑͼ]';
34
select * from ��Ƒ�㑻������� where ������ ~* '�����[��ԑͼ]';
35
select *,character_length(������) from ��Ƒ�㑻�������;
36
select *,octet_length(������) from ��Ƒ�㑻�������;
37
select *,position('���' in ������) from ��Ƒ�㑻�������;
38
select *,substring(������ from 3 for 4) from ��Ƒ�㑻�������;
39
drop table �ͪ�ߩ�Ѧ��듾�;
40
create table �ͪ�ߩ�Ѧ��듾� (��듾� text, ����ړ�� varchar, ����1A�� char(16));
41
create index �ͪ�ߩ�Ѧ��듾�index1 on �ͪ�ߩ�Ѧ��듾� using btree (��듾�);
42
create index �ͪ�ߩ�Ѧ��듾�index2 on �ͪ�ߩ�Ѧ��듾� using hash (����ړ��);
43
insert into �ͪ�ߩ�Ѧ��듾� values('��ēǻ��͓���Ó�����', '�ѦA01�߾');
44
insert into �ͪ�ߩ�Ѧ��듾� values('��ēǻ��͓�ד����ȓ��', '���B10���');
45
insert into �ͪ�ߩ�Ѧ��듾� values('��ēǻ��͓����Γ�ד�����', '���Z01���');
47
select * from �ͪ�ߩ�Ѧ��듾�;
48
select * from �ͪ�ߩ�Ѧ��듾� where ����ړ�� = '���Z01���';
49
select * from �ͪ�ߩ�Ѧ��듾� where ����ړ�� ~* '���z01���';
50
select * from �ͪ�ߩ�Ѧ��듾� where ����ړ�� like '_Z01_';
51
select * from �ͪ�ߩ�Ѧ��듾� where ����ړ�� like '_Z%';
52
select * from �ͪ�ߩ�Ѧ��듾� where ��듾� ~ '��ēǻ���[����]';
53
select * from �ͪ�ߩ�Ѧ��듾� where ��듾� ~* '��ēǻ���[����]';
54
select *,character_length(��듾�) from �ͪ�ߩ�Ѧ��듾�;
55
select *,octet_length(��듾�) from �ͪ�ߩ�Ѧ��듾�;
56
select *,position('���' in ��듾�) from �ͪ�ߩ�Ѧ��듾�;
57
select *,substring(��듾� from 3 for 4) from �ͪ�ߩ�Ѧ��듾�;
59
create table test (t text);
60
insert into test values('ENGLISH');
61
insert into test values('FRAN��AIS');
62
insert into test values('ESPA��OL');
63
insert into test values('��SLENSKA');
64
insert into test values('ENGLISH FRAN��AIS ESPA��OL ��SLENSKA');
67
select * from test where t = 'ESPA��OL';
68
select * from test where t ~* 'espa��ol';
69
select *,character_length(t) from test;
70
select *,octet_length(t) from test;
71
select *,position('L' in t) from test;
72
select *,substring(t from 3 for 4) from test;