Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 ·×»»µ¡ÍѸì;