Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-table-select #12

Open
Selflocking opened this issue Oct 17, 2023 · 1 comment
Open

create-table-select #12

Selflocking opened this issue Oct 17, 2023 · 1 comment
Assignees
Labels
20分 20分 medium 中等

Comments

@Selflocking
Copy link
Member

赛题描述

复制表。

复制表并不是数据库中常用的功能,但是可以极大的方便我们测试与运维。其基本功能是在建表时通过select语句,直接创建出一张新的表,新表的结构通过select语句推导出来,数据会直接导入到新表中。

示例:

create table create_table_select_t6 as select t1.id, t1.age, t2.name from create_table_select_t1 t1, create_table_select_t2 t2 where t1.id=t2.id;

赛题地址

https://open.oceanbase.com/train/TopicDetails?questionId=600004&subQesitonId=800024&subQuestionName=create-table-select

@Selflocking Selflocking added easy 简单 medium 中等 20分 20分 and removed easy 简单 labels Oct 17, 2023
@Days-gone Days-gone self-assigned this Oct 29, 2023
@Selflocking
Copy link
Member Author

create table select 依赖子查询(#19),或者说应该和子查询复用同一代码比较好。同时可能依赖表达式(#6 )

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
20分 20分 medium 中等
Projects
None yet
Development

No branches or pull requests

2 participants