1. 程式人生 > >[牛客網]針對actor表建立檢視actor_name_view

[牛客網]針對actor表建立檢視actor_name_view

針對actor表建立檢視actor_name_view,只包含first_name以及last_name兩列,並對這兩列重新命名,first_name為first_name_v,last_name修改為last_name_v:
CREATE TABLE IF NOT EXISTS actor (
actor_id smallint(5) NOT NULL PRIMARY KEY,
first_name varchar(45) NOT NULL,
last_name varchar(45) NOT NULL,
last_update timestamp NOT NULL DEFAULT (datetime('now','localtime')))