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

What is normalization and what are the different forms of normalizations?

2 Answers  

What is transaction ? Give me one example.

11 Answers   Wipro, Melstar,

how to find out the repeated value from table using groupby function?

4 Answers  

I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that

0 Answers  

How can we call UDF(User Define Function) using C# code in ASP.net ?

1 Answers  

What is data modeling and Reterminal integrity?

0 Answers  

hw you create table in sql using existing table and variable should be in specific order given ex : in old table empid empname empsal empage empbirthdate empaddrs like is there in new table we need it as EX: exmpname empage empaddrs empid empbirthdate like we want hw we create this as a table not view or nt reporting

2 Answers  

What is stored procedure in SQL..??

2 Answers  

How to delete the duplicate rows from a table in SQL Server ??

3 Answers  

What is bit datatype and what's the information that can be stored inside a bit column?

1 Answers  

What are the types of indexes available with SQL Server?

2 Answers   Standard Bank,

CREATE TABLE [dbo].[HPMS_CompetencyTypes](CompetencyType varchar(50) ) go create trigger hpms_create_Insert on HPMS_CompetencyTypes for insert as if Exists ( select * from [HPMS_CompetencyTypes] where CompetencyType=(select * from [HPMS_CompetencyTypes])) begin Rollback tran Raiserror ('duplicate value',12,6) go insert HPMS_CompetencyTypes (CompetencyType) values ('new') I'm new to trigger can any one tell me where is the issue. Please.

2 Answers