题解 | #针对actor表创建视图actor_name_view#
针对actor表创建视图actor_name_view
http://www.nowcoder.com/practice/b9db784b5e3d488cbd30bd78fdb2a862
本题有两种解法:
首先先介绍一下视图的语法
语法: CREATE VIEW <视图名> AS <SELECT 语句>
方法一:
create view actor_name_view as
select first_name as first_name_v, last_name as last_name_v
from actor
方法二:直接在视图名的后面用小括号创建视图中的字段名
create view actor_name_view(first_name_v, last_name_v) as
select first_name, last_name
from actor
SQL练习 文章被收录于专栏
已完成牛客的SQL练习。接下来是算法的练习