drop table ¼t°Ó¸ê®Æ;
|
create table ¼t°Ó¸ê®Æ (¦æ·~§O text, ¤½¥q©ïÀY varchar, ¦a§} varchar(16));
|
create index ¼t°Ó¸ê®Æindex1 on ¼t°Ó¸ê®Æ using btree (¦æ·~§O);
|
create index ¼t°Ó¸ê®Æindex2 on ¼t°Ó¸ê®Æ using hash (¤½¥q©ïÀY);
|
insert into ¼t°Ó¸ê®Æ values ('¹q¸£·~', '¹F¹F¬ì§Þ', '¥_A01¤¯');
|
insert into ¼t°Ó¸ê®Æ values ('»s³y·~', '°]·½¦³¤½¥q', '¤¤B10¤¤');
|
insert into ¼t°Ó¸ê®Æ values ('À\¶¼·~', '¬ü¨ýªÑ¥÷¦³¤½¥q', '°ªZ01¤E');
|
vacuum ¼t°Ó¸ê®Æ;
|
select * from ¼t°Ó¸ê®Æ;
|
select * from ¼t°Ó¸ê®Æ where ¦a§} = '°ªZ01¤E';
|
select * from ¼t°Ó¸ê®Æ where ¦a§} ~* '°ªz01¤E';
|
select * from ¼t°Ó¸ê®Æ where ¦a§} like '_Z01_';
|
select * from ¼t°Ó¸ê®Æ where ¦a§} like '_Z%';
|
select * from ¼t°Ó¸ê®Æ where ¤½¥q©ïÀY ~ '¹F¹F¬ì[±H°O§Þ]';
|
select * from ¼t°Ó¸ê®Æ where ¤½¥q©ïÀY ~* '¹F¹F¬ì[±H°O§Þ]';
|
|
select *, character_length(¦æ·~§O) from ¼t°Ó¸ê®Æ;
|
select *, octet_length(¦æ·~§O) from ¼t°Ó¸ê®Æ;
|
select *, position('¦³' in ¤½¥q©ïÀY) from ¼t°Ó¸ê®Æ;
|
select *, substring(¤½¥q©ïÀY from 3 for 6 ) from ¼t°Ó¸ê®Æ;
|