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

What are indexes in oracle?

620


What is database client?

535


How does database replication work?

550


can any one tell me how i can start database testing mean what should be initial point and how i can write a query for listing page of any item thanks in advance

2097


give a simple example of physical and logical data independence

2092






Please post the scenerois for writing the complex sql queries , for my practice.Can be any query if you cannot solve.

2059


Given a table of Player which contains Sno and player name, write a query which finds all possible Table Tennis doubles pairings.

919


What are database connection details?

635


Can you tell any two advantages of stored procedures?

584


Given a table Employee which has columns name and salary, write an SQL query to find the employee with the second highest salary.

582


What advantages does DBMS have over traditional file systems?

585


Explain about ur projets on teradata???

1349


What is the purpose of TNS?

652


What is database schema name?

572


Difference between sql and mysql?

1620