what is the difference between procedure and function.

Answer Posted / saraswathi muthuraman

Function :

1) Must return a single value. Only one value can be return
from a function.

2) Can be called from a sql(insert,update,delete) or
assignment st.U can't execute the function directly.

3) Can have DML,DDL,TLC inside function. But those function
can not be called from a sql.

Procedure :

1) Procedure can return multiple values.Procedure is
optional to return a value.

2) Can be executed directly and u can't called procedure
from sql.

3)Can have DML,DDL,TLC inside Procedure.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?

1726


What does dml stand for?

685


What are the 7 disadvantages to a manual system?

683


How to get all stored procedures in sql server?

685


Do you know exporting and importing utility?

696






How to optimize stored procedures in sql server?

833


What is the difference between ‘having’ clause and a ‘where’ clause?

768


If no size is defined while creating the database, what size will the database have?

744


Describe and explain about SQL native client?

789


What are system databases in ms sql server?

699


When does the auto update index statistics feature in sql server turn itself on?q) what specific conditions database should meet, before you can bulk copy data into it using bcp?

756


What is difference between createstatement and preparedstatement?

791


How you can move data or databases between servers and databases in sql server?

763


How to edit table in sql server 2017?

679


what are the new features in SSRS?

115