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.
| Author |
Topic |
|
litesh80
Starting Member
1 Post |
Posted - 2005-08-23 : 01:45:28
|
| Hi how do i use stored procedures and views in sql server 7.0.I am new to sql server and please help in a better way.Bye Bye..RegardsVishal. |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-08-23 : 03:13:47
|
| Hello Vishal, welcome to SQL Team. Do you have the client tools (Query Analyser, Enterprise Manager, Books Online etc) on your computer. They Should be on the Start menu. If so you use Query Analyser to script views and stored procedures. If you want more information on the syntax then Books Online (BOL) if the online help and has a great deal of useful informationsteveAlright Brain, you don't like me, and I don't like you. But lets just do this, and I can get back to killing you with beer. |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2005-08-23 : 03:24:30
|
| please explain what you are trying to do, that might help us help you a little better. I'll give it my best shot anyway:In a nutshell, Views are simply stored SELECT statements that you refer to as if they were a real table. I typically use them to help simplify my code and make it a little more manageable. Views can be referred to in the FROM clause of a SELECT statement and used in JOINs just like a real table.A stored procedure is a small program usually written in a slightly modified version of SQL. T-SQL is microsoft and Sybase's proceduralized version of SQL, PL/SQL is Oracle's flavor of the same thing. Stored procedures are stored directly in the database just like other database objects (tables, views, triggers, etc.) The big advantage to a stored procedure is that they can run much faster than an equivalent ad-hoc SQL query. Stored procedures also allow you greater flexibility with regards to security, and their use can protect you from nasty things like SQL injection exploits.Note that Stored procedures cannot be referenced in a SELECT statement.-ec |
 |
|
|
|
|
|
|
|