1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【SQL】曖昧検索

Posted at

たまに触るRedashで曖昧検索のやり方を何度か調べている気がしたので、備忘録(あるいは自戒)として。

SQLでは、like句を使用することで列(カラム)に対しての文字列検索が可能となる。

##完全一致


select 列名 
from テーブル名
where 列名
like '検索文字'

##部分一致(曖昧検索)


select 列名 
from テーブル名
where 列名
like '%検索文字%'

とすると部分一致(ワイルドカード検索)が可能。

参考:【SQL】意外と簡単!これならわかるLIKE句でのあいまい検索

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?