What are the difference between a function and a stored procedure?

1) Functions can be used in a select statement where as procedures cannot
2) Procedure takes both input and output parameters but Functions takes only input parameters

Give some more

Replies

  • Saandeep Sreerambatla
    Saandeep Sreerambatla
    I have a question here..

    Which programming language you are talking about?

    I am not sure this is true for everything ? Correct me If i am wrong ๐Ÿ˜€
  • Mahesh Dahale
    Mahesh Dahale
    English-Scared
    I have a question here..

    Which programming language you are talking about?

    I am not sure this is true for everything ? Correct me If i am wrong ๐Ÿ˜€
    sorry for that ES

    talking about SQL function and a stored procedure
    I am preparing for Oracle certification ๐Ÿ˜Ž
  • Saandeep Sreerambatla
    Saandeep Sreerambatla
    mahesh_dahale
    sorry for that ES

    talking about SQL function and a stored procedure
    I am preparing for Oracle certification ๐Ÿ˜Ž

    Thanks for the information dude.

    I dont know anything about SQL, but I can learn from this thread.

    Please keep this thread alive.
  • sookie
    sookie
    Functions must return a value back to the caller. They don't have any OUT parameter but have RETURN value.

    Stored Procedures can return multiple values to the caller by use of OUT parameters.
  • Mahesh Dahale
    Mahesh Dahale
    Thanks ES and Sookie

    Now
    What is the difference between a CONSTRAINT AND RULE?
  • specialdb
    specialdb
    1. Functions are compiled and executed at run time.
    Stored procedures are stored in parsed and compiled format in the database.

    2. Functions cannot affect the state of the database which means we cannot perform insert,delete,update and create operations on the database.
    Stored Procedures can affect the state of the database by using insert,delete,update and create operations.

    3 Functions are basically used to compute values. We passes some parameters to functions as input and then it performs some operations on the parameter and return output.
    Stored procedures are basically used to process the task.


You are reading an archived discussion.

Related Posts

Notable usage Use in campaigning Use in legal proceedings Use in education Use in emergencies Use in protest and politics Use in public relations Use in reporting dissent Use in...
"The Acer Aspire One AOD250 dual boots both Android and Microsoft Windows XP, out of the box. On the AOD250 Android is acting as an "instant on" operating system for...
CEans, One of my ex-colleagues informed that Patni Computers - one of the India's oldest computer firms is open for takeover. I'm not sure if this is a rumor or...
If you haven't heard of it yet, let me give you a brief introduction of what RealityServer does: RealityServer is a 'platform' that runs in 'cloud environment' powered by GPUs...
i am a 3rd year mechanical engineering student at mimit,malout.i want to do my 6 months industrial training in the automobile sector.provide me with some worthy suggestions.