本文共 1796 字,大约阅读时间需要 5 分钟。
drop sql语句
This guide covers the SQL statement for dropping (deleting) one or more view objects.
本指南介绍了用于删除(删除)一个或多个视图对象SQL语句。
A View is an object that presents data from one or more tables.
视图是显示来自一个或多个表的数据的对象。
Note: before deleting or changing data or objects, remember to have a fresh backup.
注意:删除或更改数据或对象之前,请记住要进行全新备份。
We will cover:
我们将介绍:
We’ll be using MySQL for the demontration. Check the manual for this function in other Database Managers.
我们将使用MySQL进行清除。 在其他数据库管理器中查看有关此功能的手册。
We’ll drop the view called students_dropMe_v
, which was created just for this purpose.
我们将删除名为students_dropMe_v
的视图,该视图就是为此目的而创建的。
DROP VIEW [IF EXISTS] view_name [, view_name] ...
The if exists portion will “trap” errors, should the view not exist.
如果该视图不存在,则如果存在部分将“捕获”错误。
drop view if exists students_dropMe_v;
The view after creation:
创建后的视图:
From the workbench:
在工作台上:
*As with all of these SQL things there is MUCH MORE to them than what’s in this introductory guide. I hope this at least gives you enough to get started.
*与所有这些SQL事物一样,它们比本入门指南中的内容要多得多。 我希望这至少能给您足够的入门。
Please see the manual for your database manager and have fun trying different options yourself.*
请参阅数据库管理员手册,并尝试自己尝试其他选项,以获取乐趣。*
Here’s the SQL I used to create the table that we just dropped:
这是我用来创建刚刚删除的表SQL:
create view `students_dropMe_v` asselect FullName, programOfStudy from student where programOfStudy = 'Programming';
翻译自:
drop sql语句
转载地址:http://kqrwd.baihongyu.com/