Some SQL question..

  • Thread starter Thread starter jack
  • Start date Start date
J

jack

Im sorry to post and sql question in the asp.net forum but just wanted
to know

Whats the difference between sql Functions and Procedures?

This is one of the simple question which is common interview question.
 
You can use functions in expressions like

select formatName (first_name, last_name, middle_name, title) ...
 
Thanks for replying. but now i got that function can return tables
stored procedues cant.

That's true though, for the vast majority of the time, makes no
difference...

Chances are that if your UDF returns a table it does so because you are
interested in the contents of the table anyway, and an SP obviously can
return the contents of a table as a recordset simply by running SELECT *
FROM MyTable
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top