PostgreSQL - 如何在表列中搜索文本

时间:2017-03-24 00:37:03

标签: postgresql

我有一个名为Students的表,其中包含许多名称和相关ID。例如

Id   |   Name
123      john
122      james
248      jake

我想写一个select查询,允许我搜索特定的Id。

我试过

select Id from Students where Id ~ '248'

但它似乎不起作用。我对官方PostgreSQL文档感到困惑。是否有某种方式来编写此查询?

感谢。

0 个答案:

没有答案