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:

在工作臺上:

  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` as
select FullName, programOfStudy 
from student 
where programOfStudy = 'Programming';

翻譯自: https://www.freecodecamp.org/news/the-sql-drop-view-statement/

drop sql語句

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/390875.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390875.shtml
英文地址,請注明出處:http://en.pswp.cn/news/390875.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

async 和 await的前世今生 (轉載)

async 和 await 出現在C# 5.0之后,給并行編程帶來了不少的方便,特別是當在MVC中的Action也變成async之后,有點開始什么都是async的味道了。但是這也給我們編程埋下了一些隱患,有時候可能會產生一些我們自己都不知道怎么產生的Bug&…

項目案例:qq數據庫管理_2小時元項目:項目管理您的數據科學學習

項目案例:qq數據庫管理Many of us are struggling to prioritize our learning as a working professional or aspiring data scientist. We’re told that we need to learn so many things that at times it can be overwhelming. Recently, I’ve felt like there could be …

react 示例_2020年的React Cheatsheet(+真實示例)

react 示例Ive put together for you an entire visual cheatsheet of all of the concepts and skills you need to master React in 2020.我為您匯總了2020年掌握React所需的所有概念和技能的完整視覺摘要。 But dont let the label cheatsheet fool you. This is more than…

leetcode 993. 二叉樹的堂兄弟節點

在二叉樹中,根節點位于深度 0 處,每個深度為 k 的節點的子節點位于深度 k1 處。 如果二叉樹的兩個節點深度相同,但 父節點不同 ,則它們是一對堂兄弟節點。 我們給出了具有唯一值的二叉樹的根節點 root ,以及樹中兩個…

Java之Set集合的怪

工作中可能用Set比較少,但是如果用的時候,出的一些問題很讓人摸不著頭腦,然后我就看了一下Set的底層實現,大吃一驚。 ###看一個問題 Map map new HashMap();map.put(1,"a");map.put(12,"ab");map.put(123,&q…

為mysql數據庫建立索引

前些時候,一位頗高級的程序員居然問我什么叫做索引,令我感到十分的驚奇,我想這絕不會是滄海一粟,因為有成千上萬的開發者(可能大部分是使用MySQL的)都沒有受過有關數據庫的正規培訓,盡管他們都為…

查詢數據庫中有多少個數據表_您的數據中有多少汁?

查詢數據庫中有多少個數據表97%. That’s the percentage of data that sits unused by organizations according to Gartner, making up so-called “dark data”.97 %。 根據Gartner的說法,這就是組織未使用的數據百分比,即所謂的“ 暗數據…

記錄一個Python鼠標自動模塊用法和selenium加載網頁插件的設置

寫爬蟲,或者網頁自動化,讓程序自動完成一些重復性的枯燥的網頁操作,是最常見的需求。能夠解放雙手,空出時間看看手機,或者學習別的東西,甚至還能幫朋友親戚減輕工作量。 然而,網頁自動化代碼編寫…

和css3實例教程_最好CSS和CSS3教程

和css3實例教程級聯樣式表(CSS) (Cascading Style Sheets (CSS)) CSS is an acronym for Cascading Style Sheets. It was first invented in 1996, and is now a standard feature of all major web browsers.CSS是層疊樣式表的縮寫。 它于1996年首次發明,現在已成…

leetcode 1442. 形成兩個異或相等數組的三元組數目(位運算)

給你一個整數數組 arr 。 現需要從數組中取三個下標 i、j 和 k &#xff0c;其中 (0 < i < j < k < arr.length) 。 a 和 b 定義如下&#xff1a; a arr[i] ^ arr[i 1] ^ … ^ arr[j - 1] b arr[j] ^ arr[j 1] ^ … ^ arr[k] 注意&#xff1a;^ 表示 按位異…

數據科學與大數據技術的案例_作為數據科學家解決問題的案例研究

數據科學與大數據技術的案例There are two myths about how data scientists solve problems: one is that the problem naturally exists, hence the challenge for a data scientist is to use an algorithm and put it into production. Another myth considers data scient…

AJAX, callback,promise and generator

AJAX with jQuery $.ajax({url:??,type:??,data:??,success: function(){??} //callback,error:function(jqXHR,textStatus,error){??} })think about what AJAX wants from human , AJAX asks questions : tell Me By Which Way You Want To Do Things : —— GET …

Spring-Boot + AOP實現多數據源動態切換

2019獨角獸企業重金招聘Python工程師標準>>> 最近在做保證金余額查詢優化&#xff0c;在項目啟動時候需要把余額全量加載到本地緩存&#xff0c;因為需要全量查詢所有騎手的保證金余額&#xff0c;為了不影響主數據庫的性能&#xff0c;考慮把這個查詢走從庫。所以涉…

css 幻燈片_如何使用HTML,CSS和JavaScript創建幻燈片

css 幻燈片A web slideshow is a sequence of images or text that consists of showing one element of the sequence in a certain time interval.網絡幻燈片是一系列圖像或文本&#xff0c;包括在一定時間間隔內顯示序列中的一個元素。 For this tutorial you can create a…

leetcode 1738. 找出第 K 大的異或坐標值

本文正在參加「Java主題月 - Java 刷題打卡」&#xff0c;詳情查看 活動鏈接 題目 給你一個二維矩陣 matrix 和一個整數 k &#xff0c;矩陣大小為 m x n 由非負整數組成。 矩陣中坐標 (a, b) 的 值 可由對所有滿足 0 < i < a < m 且 0 < j < b < n 的元素…

【數據庫】Oracle用戶、授權、角色管理

創建和刪除用戶是Oracle用戶管理中的常見操作&#xff0c;但這其中隱含了Oracle數據庫系統的系統權限與對象權限方面的知識。掌握還Oracle用戶的授權操作和原理&#xff0c;可以有效提升我們的工作效率。 Oracle數據庫的權限系統分為系統權限與對象權限。系統權限( Database Sy…

商業數據科學

數據科學 &#xff0c; 意見 (Data Science, Opinion) “There is a saying, ‘A jack of all trades and a master of none.’ When it comes to being a data scientist you need to be a bit like this, but perhaps a better saying would be, ‘A jack of all trades and …

為什么游戲開發者不玩游戲_什么是游戲開發?

為什么游戲開發者不玩游戲Game Development is the art of creating games and describes the design, development and release of a game. It may involve concept generation, design, build, test and release. While you create a game, it is important to think about t…

leetcode 692. 前K個高頻單詞

題目 給一非空的單詞列表&#xff0c;返回前 k 個出現次數最多的單詞。 返回的答案應該按單詞出現頻率由高到低排序。如果不同的單詞有相同出現頻率&#xff0c;按字母順序排序。 示例 1&#xff1a; 輸入: ["i", "love", "leetcode", "…

數據顯示,中國近一半的獨角獸企業由“BATJ”四巨頭投資

中國的互聯網行業越來越有被巨頭壟斷的趨勢。百度、阿里巴巴、騰訊、京東&#xff0c;這四大巨頭支撐起了中國近一半的獨角獸企業。CB Insights日前發表了題為“Nearly Half Of China’s Unicorns Backed By Baidu, Alibaba, Tencent, Or JD.com”的數據分析文章&#xff0c;列…