when we use function instead of procedure? plz tell me the
situation with ex?

Answers were Sorted based on User's Feedback



when we use function instead of procedure? plz tell me the situation with ex?..

Answer / manoj

Usually procedures are used when some action is to be
performed without retrun value.
Functions are used when some value is to be returned to the
calling enviornment.
You can not use procedure in the select statement however
functions can be used.

Is This Answer Correct ?    30 Yes 0 No

when we use function instead of procedure? plz tell me the situation with ex?..

Answer / priya

can we use default value in unique key?

Is This Answer Correct ?    4 Yes 2 No

when we use function instead of procedure? plz tell me the situation with ex?..

Answer / adil khan

procedure can only use in plsql not in sql. in other words
you can not use procedure in your select satatement. only
funtion can be used for example max(),min(),Avg() these all
are funtion not procedure.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Can you get second highest salary from the table?

0 Answers   QuestPond,


What is NOT NULL Constraint in sql server 2012?

0 Answers   CDC,


Call by value and call by reference in procedure and function, with NOCOPY.

0 Answers   Nagarro,


What are the pre-defined functions in the sql server?

0 Answers  


Write an sql query to find first weekday of the month?

0 Answers  






What is a non equi join?

0 Answers  


Table student containing 2 columns,Join date,Employee name. Under join date 4 rows r ter =1-jan-2008,2-feb-2008,3-mar- 2008,4-feb-2008.Under Employee name 4 difeerent names jaison,robin,binoy,rahul Result set is, Table containing 4-column name=jan,feb,mar,april,,beneath these months count is given as 1,2,1,0 means these counts representing number of emplooyees joined in a month(january 1employee,february 2 employee,march 1 employee,april 0 employee) Can you give me the required sql query

3 Answers   RND Soft, Wipro,


how we can count records as a group of days like sum of records for(four mondays),(four tuesday)........ in a month. group the column for weekdays.

1 Answers  


What is the function of sql server agent windows service?

0 Answers  


What is split brain scenario in DB mirroring?

1 Answers  


Do you know the policy based administration feature of sql server 2008?

0 Answers  


wht is normalization?can u explain me in detail?

9 Answers   TCS,


Categories