wht is the difference between truncat,drop in sqlserver
wht is the difference between function and stored procedure

Answers were Sorted based on User's Feedback



wht is the difference between truncat,drop in sqlserver wht is the difference between function and ..

Answer / chandra shekher

truncate command will remove the table and again recreate
the table.
drop command will remove the table permanently from the
database.


Function must return a value where as stored procedure may
or may not return a value.
Function can return only one value where as stored
procedure can return multiple values.
Function can be used in sql query where as stored procedure
cannot be used in sql query.
Function is used to compute a value where as stored
procedure can be used to perform a task

Is This Answer Correct ?    8 Yes 0 No

wht is the difference between truncat,drop in sqlserver wht is the difference between function and ..

Answer / rakesh

The Main Difference Between DELETE & TRUNCATE Are :-

[1] DELETE - is a DML Command & TRUNCATE - is a DDL Command

[2] After DELETE - can rollback the Records & After TRUNATE
- cannot rollback the records

[3] In DELETE Command you can give the conditions in WHERE
Clause & In TRUNCATE you cannot give conditions

[4] After using DELETE Command The memory will be occupied
till the user does not give ROLLBACK or COMMIT & After using
TRUNCATE Command The memory realeased immediately

Is This Answer Correct ?    8 Yes 2 No

wht is the difference between truncat,drop in sqlserver wht is the difference between function and ..

Answer / srilekha

TRUNCATE:it will delete all the records at a time but not a
stucture.
DROP:it will delete the table permanently from database;
PROCEDUE:it may be return value,it will not used in sql
queries
FUNCTION:it returns a value,it will used in sql queries

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

how are mysql timestamps seen to a user? : Sql dba

0 Answers  


Is it possible to create the following trigger: before or after update trigger for each row?

0 Answers  


What is thread join () in threading?

0 Answers  


How do I remove sql plus from windows 10?

0 Answers  


What is rownum?

0 Answers  






What is a sql statement?

0 Answers  


Can we create table in function?

0 Answers  


What is the best free sql database?

0 Answers  


how to create object in plsql

2 Answers   TCS,


How is use pl and sql?

0 Answers  


Can we use commit or rollback in trigger? If yes, then how. Please explain with a suitable example?

5 Answers   HSBC,


What is the difference between a query and a report?

0 Answers  


Categories