select * from TEST_T where ID_C=1; select * from TEST_T where ID_C>5 order by ID_C; select * from TEST_T likeと%と_の使い方。%は文字数不明 _は1文字にHIT select * from TEST_T where ADD_C like 'Na%';Naで始まる住所 select * from TEST_T where NAME_C like '___';#3文字の名前を取り出す
whereの最近のブログ記事
select * from TEST_T where ID_C=1; select * from TEST_T where ID_C>5 order by ID_C; select * from TEST_T where ID_C>5 order by ID_C limit 0,3; select * from TEST_T where ADD_C='KYOTO'; select * from TEST_T where ADD_C='KYOTO' and ID_C>=4; select * from TEST_T where ADD_C='KYOTO' or ADD_C='Kyoto'; select * from TEST_T where not(ADD_C='KYOTO') order by ID_C; select * from TEST_T where not(ADD_C='KYOTO' or ADD_C='NAGASAKI')order by ID_C;
in(2,5,8)
IDが2と5と8を取り出す。
select * from TEST_T where ID_C in(2,5,8);
between
select * from TEST_T where ID_C between 5 and 8;あまり使わない。