abcprep.com - your onestop GMAT, GRE, PMP hub
.NET FAQs Unleashed!
 
    



    


Whats the difference between a Stored Procedure and a Function in SQL?

Primarily, the main difference between a Stored Procedure and a Function in SQL is that a Function has the ability to return a value to the calling routine, where as a Stored Procedure may or may not return a value, depending on how it is programmed. A Function should have a minimum of one return type.

This means that while creating a Function in SQL, it should have a return type.

Also, the results of a function may be assigned to a Select statement; this isn't possible with Stored Procs.

SQL Queries  SQL  Create Table  DDL, Create, Alter, Drop commands  DML, Select, Insert, Update, Delete  Create Database  ACID Rules  Dual Table  NULL  Join, Inner, Outer, Left, Right, Full, Cartesian, Natural, Equi  Table, View and a Synonym?  Execute  Function  Stored Procedure  Syntax Stored Proc  Stored Procedure Vs. Function








Know Your Breath, Know Your Life!!!