drop sql语句_用于从表中删除数据SQL Drop View语句
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:
在工作台上:
- Right click on the view to drop右键单击视图以拖放
- select drop view from the menu从菜单中选择下拉视图
- 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` as
select FullName, programOfStudy
from student
where programOfStudy = 'Programming';
翻译自: https://www.freecodecamp.org/news/the-sql-drop-view-statement/
drop sql语句
drop sql语句_用于从表中删除数据SQL Drop View语句相关推荐
- 查询和删除表中重复数据sql语句
查询和删除表中重复数据sql语句 (一) 1.查询表中重复数据.select * from people where peopleId in (select peopleId from pe ...
- sql server如何直接在表中修改数据
之前做项目一直用的是mysql和oracle,最近做的项目中客户使用的是sql server,之前不了解sql server,今天成功安装并且导入了数据库脚本.在做具体操作的时候,有些数据只需很小的修 ...
- mysql杠杆加号什么意思_对tb_book表中的数据,按ID序号进行升序排列,查询语句是什么?_学小易找答案...
[单选题]修改数据库表结构用以下哪一项 ( ) [单选题]对于一个微小物理量,通常采用将其进行放大的方法实现测量,以下哪个不是物理实验方法? [单选题]扭摆实验中,为了测出金属匀质细杆绕质心对称轴的转 ...
- 存在的hive插入数据_往hive表中插入数据以及导出数据
转载:https://blog.csdn.net/qq_26442553/article/details/80380590 转载:https://blog.csdn.net/weixin_436817 ...
- 快速复制数据库表中的数据SQL
---通过复制tbl_int_dual2表中的数据产生tbl_int_dual1表中2015-11-11上午8点的小时类统一接口统计数据.insert into tbl_int_dual1(field ...
- 人名和成绩一起排序_不同工作表中的数据表排序各异,如何用Excel数据透视表汇总?...
用数据透视表做分析的时候,有时源数据有好几张数据表,且分布在不同的地方.且因为维护源数据的人不同,数据表的行.列标题也未必固定不变. 那么问题来了,如果各个数据表的行标题排序各不相同,如何将它们合并到 ...
- sql语句-如何以一个表中的数据为条件据查询另一个表中的数据
下面这个是SQL语句的一个基本样式: select *from 表2where 姓名 in (select 姓名from 表1where 条件) 实例需求:在项目中是这样应用的:我需要根据库位编号去查 ...
- SQL Server 数据库中将数据表中的数据转化为Insert 语句
Use Northwind Select 'Insert Into Customer(CustomerID,CompanyName,ContactName) Values ('+'''' +Cust ...
- 使用insert向表中添加数据MySQL_使用INSERT语句向表中插入数据(MSSQLSERVER版)
做开发的同仁对于向数据库中插入数据可谓是太普通不过了,也没什么说的,一般都是采用常用的INSERT INTO [(字段列表)] VALUES(字段值列表),这样的方式进行操作.今天,我要给大家介绍的是 ...
最新文章
- LeetCode简单题之比赛中的配对次数
- 这些片段在Android编程中很有用 (ZT)
- CentOS7下Hadoop集群搭建
- 《Storm企业级应用:实战、运维和调优》——1.6 本章小结
- python编程基础之六
- C#之判断Mysql数据库表是否存在
- 信用评分卡 (part 4 of 7)
- CTFSHOW【萌新计划】Writeup
- ppa什么网_ppa网站-和ppa网站相关的内容-阿里云开发者社区
- Unity关于Oculus Quest2 基于XR Interaction Toolkit 基础开发 001-位置移动加旋转
- 自然码双拼输入法的辅助码编写问题
- (转)艾宾浩斯遗忘曲线复习计划表
- ReacNative:报错Cannot add a child that doesn’t have a YogaNode to a parent without a measure function!
- Windbg串口联调
- java 上转型对象_Java中上转型对象数组
- 完美解决**ModuleNotFoundError: No module named ‘src‘**
- Linux系统有什么优势?
- 如何使用SPSS按行显示和按列显示的摘要报告
- zynq7000 AMP双核IPC+SharedMem通信
- ROS机器人操作系统最佳实践指南