Difference between:
- Delete & Truncate
- Table & View
- Constraints & Triggers

Difference between: - Delete & Truncate - Table & View - Constraints & Triggers..

Answer / amrish kumar

The DELETE command is used to remove rows from a table. A
WHERE clause can be used to only remove some rows. If no
WHERE condition is specified, all rows will be removed.
After performing a DELETE operation you need to
COMMIT or ROLLBACK the transaction to make the change
permanent or to undo it.

TRUNCATE removes all rows from a table. The operation cannot
be rolled back. As such, TRUCATE is faster and doesn't use
as much undo space as a DELETE.

DROP and TRUNCATE are DDL commands, whereas DELETE is a DML
command. Therefore DELETE operations can be rolled back
(undone), while DROP and TRUNCATE operations cannot be
rolled back.

Table is a basic unit of data storage in an oracle database.
It holds all user accessible data.

View is a virtual table
- It can be created on a table or another view.
- It is just like a window through which we can access or
change base table data.
- It does contain data of its own. It always takes data from
its base table.
- It is stored as a query in data dictionary.Whenever you
query a view it gets data from its based table using this query.

Constraints are great at maintaining database integrity for
database fields and relationships between database tables.

Triggers are great for checking past vs. current values and
making decisions based on that data.

Is This Answer Correct ?    11 Yes 0 No

Post New Answer

More SQL Server Interview Questions

How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?

3 Answers   HCL,

what command is used to create a table by copying the structure of another table?

7 Answers  

What is the difference between HAVING clause and the WHERE clause?

7 Answers  

hi, may i know what is the command to get abstract the current month, current year and current day from a given date.i want these three in a isolated way..seperatedly is that any way in sql server 2000

3 Answers  

What is the basic functions for master, msdb, tempdb databases?

2 Answers   CSC,

Explain different isolation levels?

4 Answers  

What meant by Performance Tuning,how can we do the performance tuning on stored procedures and tell some steps to do the performance tuning

3 Answers   TCS,

What is blocking and how would you troubleshoot it?

3 Answers   HCL,

How do I compare two values when one value(data type) is char and the other is an integer?

3 Answers  

What is Deadlock?

4 Answers   Satyam,

What is the difference between views and stored procedures? Can we have input parameters for views?

6 Answers  

1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?

10 Answers   Perot Systems,