日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

drop sql语句_用于从表中删除数据SQL Drop View语句

發(fā)布時間:2023/11/29 数据库 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 drop sql语句_用于从表中删除数据SQL Drop View语句 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

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:

在工作臺上:

  • 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以檢查要執(zhí)行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事物一樣,它們比本入門指南中的內(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)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。