Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql between and 、 in

Shulou Source: shulou.com Published: 2022-06-01 10:07:35 09月29日 Update

# case, query employee information with employee numbers between 100 and 120

SELECT * FROM employees WHERE employee_id BETWEEN 100 AND 200; # the order cannot be reversed

In

Case: query employee type number is an employee name and job number in IT_PROG, AD_VP, AD_PRES

SELECT last_name,job_idFROM employeesWHERE job_id IN ('IT_PROT','AD_VP','AD_PRES'); # in followed by parentheses and single quotation marks string form # in does not support wildcards

Tags: Employee type of work form case query between information character string quotation mark parenthesis wildcard order add support reverse Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MySQL Shulou Tech Info Microsoft macOS