gpt4 book ai didi

mysql - 就像 MySQL 中不使用 OR 或 Union 的情况

转载 作者:可可西里 更新时间:2023-11-01 07:55:43 25 4
gpt4 key购买 nike

我想获取所有从 A 或 B 或 C 开始的员工姓名。我也不想使用 Union 或 OR 条件。

注意:我不想要这两个解决方案案例 1.(如“%A”或“%B”或“%C”)。CASE 2. 单独抓取并使用 union 组合。

我在这里创建了示例数据 sample link请找到它。

最佳答案

试试这个

Select * from employee where substring(emp_name, 1, 1) in ('A', 'B', 'C');

关于mysql - 就像 MySQL 中不使用 OR 或 Union 的情况,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51183727/

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