SQL 刪除


1、delete from table_name

2、drop table table_name

drop table is different from deleting all of the records in the table. Deleting all of the records in the table leaves the table including column and constraint information. Dropping the table removes the table definition as well as all of its rows.
drop table不同於 delete from *table_name*。delete/刪除 一個 table 中的所有 recodrd/記錄,會留下所有的 column和constraint 信息。drop table會 remove/消除乾淨 整個表(的定義),也會刪除掉所有的行(信息)。

參考:


Drop a Table

SQL 刪除的更多相关文章

  1. [转]SQL Server 安全性概論與無法刪除資料庫使用者的解決辦法

    經常有人來問我特定 SQL Server 資料庫裡的使用者無法刪除的問題,這問題其實跟 SQL Server 的安全性架構有很大關係,解決這個問題當然還是瞭解觀念的重要性大於知道如何解決問題.除了講解 ...

  2. [Ms SQL] 基本創建、修改與刪除

    ##創建 table student, 內涵 id ,name ,tel三種columne,設定id為primary key create table student ( id int primary ...

  3. SQL觸發器聯級刪除

    Create TRIGGER [dbo].[trigInstructionsDelete] ON dbo.Instructions instead OF DELETE AS BEGIN DECLARE ...

  4. SQL Sever 刪除重複數據只剩一條

    use book go create table ##T1( n int, a nvarchar(20) ) --查詢重複記錄,插入臨時表 insert into ##T1(n,a) select s ...

  5. SQL Server 的 Statistics 簡介

    當你要清空「資料表(table)」,或倒入大量「資料(data;record)」,或公司「資料庫(database)」改用新版本要資料大搬家…等情形,不只是要重建「索引(index)」,還應要重建或更 ...

  6. Linq to SQL 的增删改查操作

    Linq,全称Language Integrated Query,是C#语言的一个扩展,可以将数据查询直接集成到编程语言本身中. Linq分为查询语法和方法语法,说白了查询语法就是 from wher ...

  7. 如何清除sql server日志

    1.打开查询分析器,输入命令 DUMP TRANSACTION 数据库名 WITH NO_LOG 2.再打开企业管理器--右键你要压缩的数据库--所有任务--收缩数据库--收缩文件--选择日志文件-- ...

  8. SQL server 与Oracle开发比较

    ●概念上区别 1.Oracle 是一种对象关系数据库管理系统(ORDBMS),而Sql server 只是关系型数据库管 理系统(RDBMS). 2.Oracle使用Internet文件系统,该系统基 ...

  9. oracle pl/sql的操作大全

    --删除该用户及下面的所有关联 DROP USER fspdrs CASCADE; --创建一个用户 create user fspdrs identified " default tabl ...

随机推荐

  1. 如何在64位系统上安装SQL Server 2000

    如何在64位系统上安装SQL Server 2000? 现在用SQL Server 2000数据库的人少了吧?大都是SQL Server 2005/2008了.不过还是有需求的,今天一朋友就让我在他的 ...

  2. css3动画属性中的transition属性

    一.语法 transition: property duration timing-function delay; 值 描述 transition-property 规定设置过渡效果的 CSS 属性的 ...

  3. android 五子棋开发

    两天完成基本功能,再对其进行细节bug优化,本小白的思路. 思路: 1.用canvas绘制棋盘:得到手机的分辨率.棋盘大小为19*19.将手机宽屏分为21份,取中间19份为棋盘.上下空白位置为按钮功能 ...

  4. CentOS下系统时间同步和时区的修改和设置(用的这个)

    一.修正时区 rm -rf /etc/localtime #删除当前默认时区www.kwx.gd ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localt ...

  5. Castle IOC FOR MVC 使用方法

    Castle Web.API 使用方法 一.创建 WindsorActivator 继承 IHttpControllerActivator public class WindsorActivator ...

  6. 【09】绝不在构造和析构过程中调用virtual方法

    1.绝不在构造和析构过程中调用virtual方法,为啥? 原因很简单,对于前者,这种情况下,子类专有成分还没有构造,对于后者,子类专有成分已经销毁,因此调用的并不是子类重写的方法,这不是程序员所期望的 ...

  7. HDU 5475 An easy problem 线段树

    An easy problem Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pi ...

  8. Codeforces Round #321 (Div. 2) E. Kefa and Watch 线段树hash

    E. Kefa and Watch Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/580/prob ...

  9. CircularProgressBar

    https://github.com/semicoder/CircularProgressBar https://github.com/amurani/MeterView

  10. Distributed systems

    http://book.mixu.net/distsys/single-page.html