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

Which one is faster ienumerable or iqueryable?

0 Answers  


how can we repair a mysql table? : Sql dba

0 Answers  


will function return more than one value how

9 Answers   Accenture,


What is int identity in sql?

0 Answers  


suppose we have values like 1 5 7 in a colum.Now we want numbers like(2 3 4 6) that exists between 1 5 7.How can we do this using sql query??

5 Answers   Keane India Ltd,






Can ddl statements be used in pl/sql?

0 Answers  


What is intersect?

1 Answers  


Is pl sql better than sql?

0 Answers  


why sql is used as interpreter frequently rather than a compile?

1 Answers  


What are the types of triggers in sql?

0 Answers  


What is Difference Between delete and Truncate?

9 Answers  


How can we make an if statement within a select statement?

0 Answers  


Categories