Differentiate between delete and truncate.
Answer / Manish Patel
DELETE removes rows from a table while preserving the table structure and Truncate removes all rows, deallocates space for them, and resets the identity column value.nDELETE is typically slower because it only marks the deleted rows as such, allowing for a potential rollback if needed. Truncate is faster because it skips the rollback process but cannot be rolled back itself.nTruncate also does not log the operation to the transaction log by default, while DELETE does.
| Is This Answer Correct ? | 0 Yes | 0 No |
In what sequence sql statement is processed?
How to connect to a sql server using odbc_connect()?
What is microsoft sql server?
What are the extra roles available in msdb? : sql server security
Describe triggers features and limitations?
How you can get a list of all the table constraints in a database? : Sql server administration
How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?
Do you know what is difference between stored procedure and user defined function?
How would you add a section to a table?
What are difference between Cluster index and Non-Cluster index?
What is the default port for SQL Server over a firewall?
Do you know what is bit data type and whats the information that can be stored inside a bit column?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)