MST

星途 面试题库

面试题:SQLite中视图的创建基础

假设你有一个名为`employees`的表,包含字段`employee_id`(整数,主键),`name`(文本),`department`(文本),`salary`(实数)。请写出创建一个视图`high_salary_employees`的SQL语句,该视图只包含`salary`大于5000的员工信息。
25.3万 热度难度
数据库SQLite

知识考点

AI 面试

面试题答案

一键面试
CREATE VIEW high_salary_employees AS
SELECT employee_id, name, department, salary
FROM employees
WHERE salary > 5000;