一、创建视图emp_v1,要求查询电话号码以‘011’开头的员工姓名和工资、邮箱
CREATE VIEW emp_v1
AS
SELECT last_name,salary,email,phone_number FROM employees WHERE phone_number LIKE "011%";
SELECT * FROM emp_v1
二、要求将视图emp_v1修改为查询电话号码以‘011’开头的并且邮箱中包含e字符的员工姓名和邮箱、电话号码
CREATE OR REPLACE VIEW emp_v1
AS
SELECT last_name,email,phone_number,salary
FROM employees
WHERE phone_number LIKE '011%' AND email LIKE '%e%';
SELECT * FROM emp_v1
三、向emp_v1插入一条记录,是否可以?
INSERT INTO emp_v1 (last_name,email,phone_number,salary) VALUES ("karl","colrtgj","011.44.1233.256325","7000");
SELECT * FROM emp_v1
不可以
四、修改刚才记录中的电话号码为‘0119'
UPDATE emp_v1 SET phone_number="0119" WHERE phone_number="011.44.1233.256325"
SELECT * FROM emp_v1
五、删除刚才记录
DELETE FROM emp_v1 WHERE phone_number="0199"