Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Diff Bet Views and Stored Procedures

Author  Topic 

srkvellanki
Starting Member

14 Posts

Posted - 2010-04-25 : 22:35:50

Hi ,

What's Differences Between Views and Stored Procedures.

Regards
Sri

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-04-25 : 22:43:09
Totally different. You create it differently, access it differently, it is for different purposes.

View is a stored Query, nature similar to a table.

Stored Procedure is like a "procedure" in most programming language

Refer to Books Online for further information
http://msdn.microsoft.com/en-us/library/ms190174.aspx
http://msdn.microsoft.com/en-us/library/ms191428%28v=SQL.90%29.aspx


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-26 : 00:29:09
View is like virtual table. you access it and use it just like a table. Procedure is chunk of compiled code which when executed can do DML operations and may or may not return a result set.Also you can make them parameter driven

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

waterduck
Aged Yak Warrior

982 Posts

Posted - 2010-04-26 : 10:35:56
view can be used as cube also...


Hope can help...but advise to wait pros with confirmation...
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-26 : 23:46:36
quote:
Originally posted by waterduck

view can be used as cube also...


Hope can help...but advise to wait pros with confirmation...


sorry didnt get that. do you mean as source for SSAS cubes?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -