在SQL中筛选列内的数据。

huangapple go评论68阅读模式
英文:

Filter within column in SQL

问题

我有一个名为Sample的MySQL数据库中的表格
在这个表格中,有一个特定的列 "Claims"
在这个列中,数据从"Payment"开始

示例,
在SQL中筛选列内的数据。

请问如何筛选出只包含"BSA"、"TLS"和"SSL"的数据?

英文:

I've a table name: Sample in MySql Database
Inside this table, there is particular column "Claims"
Within this column the data starts from Payment

Example,
在SQL中筛选列内的数据。

Can you please let me know how to filter out data that has only "BSA" and "TLS" and "SSL"

答案1

得分: 0

select * from Sample
where Claims like '%BSA%' or Claims like '%TLS%' or Claims like '%SSL%'

英文:
select * from Sample
where Claims like '%BSA%' or Claims like '%TLS%' or Claims like '%SSL%'

huangapple
  • 本文由 发表于 2023年8月9日 14:02:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/76864961-2.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定