We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
实现视图功能。
视图是数据库的基本功能之一。视图可以极大地方便数据库的使用。
视图,顾名思义,就是一个能够自动执行查询语句的虚拟表。
不过视图功能也非常复杂,需要考虑视图更新时如果更新实体表。如果视图对应了单张表,并且没有虚拟字段,更新视图,即更新了实体表。如果实体表中某些字段不在视图中,那此字段的结果应该是NULL或默认值。如果视图中包含虚拟字段,比如通过聚合查询的结果,或者视图关联了多张表,他的更新规则就变得复杂起来。在这些场景中,同学们可以参考MySQL的实现方案。
示例:
create view create_view_v4 as select t1.id as id, t1.age as age, t2.name as name from create_view_t1 t1, create_view_t2 t2 where t1.id=t2.id;
https://open.oceanbase.com/train/TopicDetails?questionId=600004&subQesitonId=800023&subQuestionName=create-view
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
赛题描述
实现视图功能。
视图是数据库的基本功能之一。视图可以极大地方便数据库的使用。
视图,顾名思义,就是一个能够自动执行查询语句的虚拟表。
不过视图功能也非常复杂,需要考虑视图更新时如果更新实体表。如果视图对应了单张表,并且没有虚拟字段,更新视图,即更新了实体表。如果实体表中某些字段不在视图中,那此字段的结果应该是NULL或默认值。如果视图中包含虚拟字段,比如通过聚合查询的结果,或者视图关联了多张表,他的更新规则就变得复杂起来。在这些场景中,同学们可以参考MySQL的实现方案。
示例:
赛题地址
https://open.oceanbase.com/train/TopicDetails?questionId=600004&subQesitonId=800023&subQuestionName=create-view
The text was updated successfully, but these errors were encountered: