gpt4 book ai didi

mySQL where in 子句

转载 作者:行者123 更新时间:2023-12-01 00:46:05 27 4
gpt4 key购买 nike

是否可以用 where in 子句做这样的事情,我需要使用 where in 查询以下数据。

select *
FROM instructor AS i
INNER JOIN teaches AS t ON i.id = t.ID
where course_id in ('C%'); -I want every course ID that begins with C

最佳答案

使用LIKE:

select *
FROM instructor AS i
INNER JOIN teaches AS t ON i.id = t.ID
where course_id LIKE 'C%';

关于mySQL where in 子句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21857103/

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