what is difference between delete and truncet ?

Answer Posted / pooja

The DELETE statement is used to delete rows in a table.

Syntax:
DELETE FROM table_name
WHERE some_column=some_value

e.g.
DELETE FROM Persons
WHERE LastName='Tjessem' AND FirstName='Jakob'


Truncate:-
What if we only want to delete the data inside the table,
and not the table itself?

Then, use the TRUNCATE TABLE statement:

Syntax:
TRUNCATE TABLE table_name

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to produce such kind of file?

638


WHAT IS THE PURPOSE OF TESTING INTEGRITY OF THE UNIVERSE?

1830


What is database collection?

580


What is the advantage of varchar2 over char?

799


What are different types of blocks used in stored procedure?

634






What is database schema name?

583


hai if any one having any project sample table structure please froward to my mail id tauseefwst@yahoo.com

1950


how can we view column head in first page but not in remaining pages?

1608


what is rcp,if rcp disabled what happen?

1717


Source File: Target EMPNO, SAL Empno, Format 101, 1000 101, 1000 101, 1100 101, 1000, 1100 101, 1000 101, 1000, 1100, 1000 101, 10000 101, 1000, 1100, 1000, 10000 102, 1100 102, 1100 102, 1300 102, 1100, 1300 102, 1200 102, 1100, 1300, 1200 102, 1500 102, 1100, 1300, 1200, 1500 How can i get that output using datastage(ETL) tool

1432


how to reject duplicates in source sequential file and if by filter option then where is that filter option in the sequential file.

1116


When should you not use firebase?

617


how node connect with cpu?

1674


What are different types of resources?

536


What are the validations performed on the source data? If there are junk data available in the source data, how to eliminate it?

1592