difference between function and procedure

Answer Posted / ramya

1.a function must returns a value where as procedure may not return value
2.a procedure can have parameters of both i/p and o/p but
fun has only i/p parameters
3.in procedure we can perform all the dml operations but in function only select operation should be performed
4.we call a procedure by using 'exec' or 'execute' command where as function is called by using 'select' command

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you please differentiate between a primary key and a unique key?

530


What are the properties and different types of sub-queries?

558


What does ss stand for sexually?

578


How can we improve performance by using SQL Server profiler?

571


Explain time data type in sal server 2008?

548






How would you go about developing a ssrs report?

110


You have several tables, and they are joined together for querying. The tables contain both clustered indexes and non clustered indexes to optimize performance, how should you distribute the tables and their indexes onto different file groups?

553


How to scale out a federation by Sql statement?

92


you have separate development and production systems you want to move a copy of a development database into production to do this, you do a backup on the development system and restore to the production system after a few minutes, you begin getting calls from several customers saying that they are denied access to the system why? : Sql server administration

550


What is standby servers? Explain types of standby servers.

509


What is the parse query button used for?

600


What does it mean to be in union?

516


What is the purpose of object explorer and its features? : sql server management studio

594


How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?

1290


Benefits of Stored Procedures?

563