博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
drop sql语句_用于从表中删除数据SQL Drop View语句
阅读量:2518 次
发布时间:2019-05-11

本文共 1796 字,大约阅读时间需要 5 分钟。

drop sql语句

介绍 (Introduction)

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:

我们将介绍:

  • Using SQL to drop a table

    使用SQL删除表
  • Using the workbench to drop a view

    使用工作台删除视图

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的视图,该视图就是为此目的而创建的。

基本语法 (Basic Syntax)

DROP VIEW [IF EXISTS]    view_name [, view_name] ...

删除视图SQL (Drop View SQL)

The if exists portion will “trap” errors, should the view not exist.

如果该视图不存在,则如果存在部分将“捕获”错误。

drop view if exists students_dropMe_v;

The view after creation:

创建后的视图:

使用工作台 (Using the Workbench)

From the workbench:

在工作台上:

  1. Right click on the view to drop

    右键单击视图以拖放
  2. select drop view from the menu

    从菜单中选择下拉视图
  3. Select either either a) run SQL to review the SQL statement to be executed or b) drop new

    选择a)运行SQL以检查要执行SQL语句,或b)删除新的

*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.*

请参阅数据库管理员手册,并尝试自己尝试其他选项,以获取乐趣。*

额外 (Extra)

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/

你可能感兴趣的文章
Polymorphism (C# Programming Guide)
查看>>
Gi命令行操作
查看>>
spring boot 中使用 jpa以及jpa介绍
查看>>
yum_rpm(利用dvd建立本地yum库)
查看>>
寻找关键帧
查看>>
今日笑话
查看>>
20180603_navicat 连接sqlserver提示要安装 sql server native client
查看>>
nginx set变量后lua无法改值
查看>>
baseAdapter
查看>>
别让你妈知道!
查看>>
JAVA设计模式之迭代子模式
查看>>
Java程序生成exe可执行文件
查看>>
什么是blob,mysql blob大小配置介绍
查看>>
模运算的规则
查看>>
CSS样式布局入门介绍,非常详尽
查看>>
20171027_Python学习第二周五次课
查看>>
LDAP验证用户名和密码
查看>>
【linux】Tomcat 安装
查看>>
JAVA中对同一问题分别使用内部类与匿名内部类实现
查看>>
处女男学Android(七)---Android 应用资源之StateListDrawable
查看>>