本文以一个简单实例为大家介绍了SQL中truncate和delete的区别,帮助大家理解,具体内容如下---创建表Table1IF OBJECT_ID('Table1','U') IS NOT NULLDROP TABLE Table1GOCREATE TABLE Table1(ID INT NOT NULL,FOID INT NOT NULL)GO--插入测试数据INS..
复制代码 代码如下:TRUNCATE TABLE (Transact-SQL)Removes all rows from a table without logging the individual row deletions. TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause; however, TRUNCATE TABLE is faster a..