SQL语句,当WHERE条件需要搜索工号为16或工号为2的雇员姓名时,需用到OR关键词如:
SELECT [ EmployeeName ] FROM [ Employee ] WHERE [ WorkNumber ] = 16 OR [ WorkNumber ] = 2
SELECT [ EmployeeName ] FROM [ Employee ] WHERE [ WorkNumber ] = 16 UNION ALL SELECT [ EmployeeName ] FROM [ Employee ] WHERE [ WorkNumber ] = 2