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.
視圖是顯示來自一個或多個表的數(shù)據(jù)的對象。
Note: before deleting or changing data or objects, remember to have a fresh backup.
注意:刪除或更改數(shù)據(jù)或?qū)ο笾?#xff0c;請記住要進行全新備份。
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進行清除。 在其他數(shù)據(jù)庫管理器中查看有關(guān)此功能的手冊。
We’ll drop the view called ?students_dropMe_v , which was created just for this purpose.
我們將刪除名為students_dropMe_v的視圖,該視圖就是為此目的而創(chuàng)建的。
基本語法 (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:
創(chuàng)建后的視圖:
使用工作臺 (Using the Workbench)
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事物一樣,它們比本入門指南中的內(nèi)容要多得多。 我希望這至少能給您足夠的入門。
Please see the manual for your database manager and have fun trying different options yourself.*
請參閱數(shù)據(jù)庫管理員手冊,并嘗試自己嘗試其他選項,以獲取樂趣。*
額外 (Extra)
Here’s the SQL I used to create the table that we just dropped:
這是我用來創(chuàng)建剛剛刪除的表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語句
總結(jié)
以上是生活随笔為你收集整理的drop sql语句_用于从表中删除数据SQL Drop View语句的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 梦到亲眼看到老公和别人发生性代表什么
- 下一篇: SQL数据类型说明和MySQL语法示例