230题解 | #创建一个actor_name表#

创建一个actor_name表

https://www.nowcoder.com/practice/881385f388cf4fe98b2ed9f8897846df

#方法一
create table actor_name as select first_name,last_name from actor
#方法二
  1. 常规创建
    create table if not exists 目标表
  2. 复制表格
    create 目标表 like 来源表
  3. 将table1的部分拿来创建table2

create table if not exists actor_name(
first_name  varchar(45)  not null,
last_name   varchar(45)  not null); -- 创建表

insert into actor_name
select     first_name,last_name
from actor; -- 插入查询结果

全部评论

相关推荐

king327:要从现有项目中挖掘1-2个你解决过的具体技术难题 详细描述你的解决方案、技术选型理由和最终效果 这比罗列更多基础功能更有说服力
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务