gpt4 book ai didi

SQL 'ends-with' 命令

转载 作者:行者123 更新时间:2023-12-04 14:31:38 24 4
gpt4 key购买 nike

我正在查询数据库以选择以某个子字符串结尾的字符串,例如 yahoo.com .

要选择相等的字符串,我会调用 select * from users where email='test@yahoo.com' .

如何选择电子邮件以 yahoo.com 结尾的用户?

最佳答案

如果您使用类似搜索并且不要在末尾添加百分比,则它实际上是一个“以”结尾。

Select * from users where email like '%yahoo.com'

关于SQL 'ends-with' 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23572930/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com