What is the difference between Stored Procedure and View?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Prakash3366
Participant
Posts: 16
Joined: Wed Jan 30, 2008 3:22 am

What is the difference between Stored Procedure and View?

Post by Prakash3366 »

Hi..
can anybody tell me , What is the difference between Stored Procedure and View?

Thanks
Prakash
PRAKASH S G
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

From a DataStage perspective, a view must be accessed via some kind of SQL-using stage, which a stored procedure must be accessed only via ODBC or Stored Procedure stages.

A view is a combination of rows and columns from one or more tables.
A stored procedure is an object in the database that can perform any action at all (not necessarily involving rows and columns), for example creating a table then creating indexes and granting permissions on it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Short answer? A view is a stored query. A stored procedure is stored code, a.k.a procedural language. Both are discrete database objects.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

Googling "Difference between Stored Procedure and View" could result a lot.
Post Reply