473,324 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Differnece between SelectStatement in View and StoredProcedure

111 100+
Hi All,

We all are creating Select statement both in View and StoredProcedure

In view it virtually links to tables.

What is the difference.

Thanks in advance
Jun 2 '08 #1
1 1303
ck9663
2,878 Expert 2GB
By basic definition, SELECT is the way you read data in a PSQL environment. For quite some time now, it's also being used to assign values to variables and also to COLUMN alias.

A stored procedure is a collection of T-SQL commands and statements that you want to be executed sequentially in a batch. If properly handled, you can even set it up to run successfully or not run at all. A stored procedure does not require and does always have SELECT statement. If you need to read data on your table, you have to use SELECT statement.

View, on the other hand, is like a temporary table staying in the memory. Once created it will run a SELECT statement against all the tables on your view definition statement and return the resulting record set as if it's a single table. A view may or may not be update-able.


Here are more readings

SELECT (T-SQL)


Stored Proc for Beginners

View Basics

-- CK
Jun 2 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Matt | last post by:
Hi, I'm trying to fill an ASP.NET DataGrid from a SQL-Server View. Note that this is a View and not a Stored Procedure. If i write the SQL instructions directly in the code, or if i use a...
6
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
1
by: Danny M | last post by:
I want to fill a datagridview with a tabel, only problem is one of the fields of this tabel is an ID to another tabel with the name.. I want to also show the name in the grid (they cant edit this...
0
by: Amol | last post by:
Hello, I am developing an apllication in which i want to change the values of datagrid checkbox column according to parameter passed to the query. But the problem is that, at first time when i...
1
by: jkeel | last post by:
If I try to Update a record with the following code using a stored procedure I get an error: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$...
9
by: Frank | last post by:
Hi, imagine there's a WEB application reading data from an Oracle database to visualize in using DataGrids in the clients browser. Yes, sounds simple, just create OracleConnection + OracleCommand...
12
by: brwalias | last post by:
Hi, using .net 2 sql server 2005 Here is my situation: I'm passing a variable in the url from a selection on Page A and need to display the results on the Results page be based on that...
1
by: phanimadhav | last post by:
Hello friends,I have one small doubt.Acually myclient asking by using tableAdapetr call the MySQL procedures.How to call the MySQL storedprocedure in TableAdapter.In the Table adapter contain one...
1
by: Tony Johansson | last post by:
Hello! Is it possible to use a StoredProcedure when you have SqlDataAdapter or is it only possible when you have SqlCommand like SqlCommand thisCommand = myConnection.CreateCommand;...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.