blob: f976010e76b7f66948e9e86409ec5d881d7056b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
QUERY: drop table �����Ѹ�;
ERROR: Relation �����Ѹ� Does Not Exist!
QUERY: create table �����Ѹ� (�Ѹ� text, ʬ�ॳ���� varchar, ����1A���� char(16));
QUERY: create index �����Ѹ�index1 on �����Ѹ� using btree (�Ѹ�);
QUERY: create index �����Ѹ�index2 on �����Ѹ� using hash (ʬ�ॳ����);
QUERY: insert into �����Ѹ� values('����ԥ塼���ǥ����ץ쥤','��A01��');
QUERY: insert into �����Ѹ� values('����ԥ塼������ե��å���','ʬB10��');
QUERY: insert into �����Ѹ� values('����ԥ塼���ץ�����ޡ�','��Z01��');
QUERY: vacuum �����Ѹ�;
QUERY: select * from �����Ѹ�;
�Ѹ� |ʬ�ॳ����|����1a����
--------------------------+----------+----------
����ԥ塼���ǥ����ץ쥤 |��A01�� |
����ԥ塼������ե��å���|ʬB10�� |
����ԥ塼���ץ�����ޡ� |��Z01�� |
(3 rows)
QUERY: select * from �����Ѹ� where ʬ�ॳ���� = '��Z01��';
�Ѹ� |ʬ�ॳ����|����1a����
------------------------+----------+----------
����ԥ塼���ץ�����ޡ�|��Z01�� |
(1 row)
QUERY: select * from �����Ѹ� where ʬ�ॳ���� ~* '��z01��';
�Ѹ� |ʬ�ॳ����|����1a����
------------------------+----------+----------
����ԥ塼���ץ�����ޡ�|��Z01�� |
(1 row)
QUERY: select * from �����Ѹ� where ʬ�ॳ���� like '_Z01_';
�Ѹ� |ʬ�ॳ����|����1a����
------------------------+----------+----------
����ԥ塼���ץ�����ޡ�|��Z01�� |
(1 row)
QUERY: select * from �����Ѹ� where ʬ�ॳ���� like '_Z%';
�Ѹ� |ʬ�ॳ����|����1a����
------------------------+----------+----------
����ԥ塼���ץ�����ޡ�|��Z01�� |
(1 row)
QUERY: select * from �����Ѹ� where �Ѹ� ~ '����ԥ塼��[�ǥ�]';
�Ѹ� |ʬ�ॳ����|����1a����
--------------------------+----------+----------
����ԥ塼���ǥ����ץ쥤 |��A01�� |
����ԥ塼������ե��å���|ʬB10�� |
(2 rows)
QUERY: select * from �����Ѹ� where �Ѹ� ~* '����ԥ塼��[�ǥ�]';
�Ѹ� |ʬ�ॳ����|����1a����
--------------------------+----------+----------
����ԥ塼���ǥ����ץ쥤 |��A01�� |
����ԥ塼������ե��å���|ʬB10�� |
(2 rows)
QUERY: select *,character_length(�Ѹ�) from �����Ѹ�;
�Ѹ� |ʬ�ॳ����|����1a����|length
--------------------------+----------+----------+------
����ԥ塼���ǥ����ץ쥤 |��A01�� | | 12
����ԥ塼������ե��å���|ʬB10�� | | 13
����ԥ塼���ץ�����ޡ� |��Z01�� | | 12
(3 rows)
QUERY: select *,octet_length(�Ѹ�) from �����Ѹ�;
�Ѹ� |ʬ�ॳ����|����1a����|octet_length
--------------------------+----------+----------+------------
����ԥ塼���ǥ����ץ쥤 |��A01�� | | 24
����ԥ塼������ե��å���|ʬB10�� | | 26
����ԥ塼���ץ�����ޡ� |��Z01�� | | 24
(3 rows)
QUERY: select *,position('��' in �Ѹ�) from �����Ѹ�;
�Ѹ� |ʬ�ॳ����|����1a����|strpos
--------------------------+----------+----------+------
����ԥ塼���ǥ����ץ쥤 |��A01�� | | 7
����ԥ塼������ե��å���|ʬB10�� | | 0
����ԥ塼���ץ�����ޡ� |��Z01�� | | 0
(3 rows)
QUERY: select *,substring(�Ѹ� from 10 for 4) from �����Ѹ�;
�Ѹ� |ʬ�ॳ����|����1a����|substr
--------------------------+----------+----------+--------
����ԥ塼���ǥ����ץ쥤 |��A01�� | |�ץ쥤
����ԥ塼������ե��å���|ʬB10�� | |���å���
����ԥ塼���ץ�����ޡ� |��Z01�� | |��ޡ�
(3 rows)
|