收藏 主页 联系
  • 示例
  • 样本数据库
#1
SELECT first_name, last_name, hire_date FROM employees WHERE CAST(strftime('%Y',hire_date) AS INTEGER) = 1997 OR CAST(strftime('%Y',hire_date) AS INTEGER) = 1998 ORDER BY first_name, last_name;
#2
SELECT first_name, last_name, hire_date, department_id FROM employees WHERE department_id = 3 AND ( CAST(strftime('%Y',hire_date) AS INTEGER) = 1997 OR CAST(strftime('%Y',hire_date) AS INTEGER) = 1998 ) ORDER BY first_name, last_name;
#3
SELECT first_name, last_name, hire_date, department_id FROM employees WHERE department_id = 3 AND CAST(strftime('%Y',hire_date) AS INTEGER) = 1997 OR CAST(strftime('%Y',hire_date) AS INTEGER) = 1998 ORDER BY first_name, last_name;
#4
SELECT first_name, last_name, hire_date FROM employees WHERE CAST(strftime('%Y',hire_date) AS INTEGER) = 2000 OR CAST(strftime('%Y',hire_date) AS INTEGER) = 1999 OR CAST(strftime('%Y',hire_date) AS INTEGER) = 1990;
#5
SELECT first_name, last_name, hire_date FROM employees WHERE CAST(strftime('%Y',hire_date) AS INTEGER) IN (1990, 1999, 2000) ORDER BY hire_date;
表格列表
国家
SELECT * FROM countries;
部门
SELECT * FROM departments;
受抚养人
SELECT * FROM dependents;
员工
SELECT * FROM employees;
工作
SELECT * FROM jobs;
地点
SELECT * FROM locations;
区域
SELECT * FROM regions;
  • SQL 查询
执行
清空 美化 压缩
刷新
  • 结果