473,804 Members | 3,675 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Differnece between SelectStatement in View and StoredProcedure

111 New Member
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 1322
ck9663
2,878 Recognized Expert Specialist
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
3714
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 stored procedure, it works great. But if the same SQL instructions are in a view, it won't work. Here it goes :
6
5524
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; DataBinder.Eval(Container.DataItem,"StoreEmail") &amp; "&amp;Subject=" &amp; DataBinder.Eval(Container.DataItem,"ProductName") ....
1
1126
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 field) To to this I can use a sql server view, right? But when i use a view i cant use the standard update command? Or is this possible by just deleting the added name column?
0
1016
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 usedto send the parameter values it shows me the result ok for first time.But as i change the value of the parameter (taken from textbox on button click) it doesn't show me the appropriate values(not checking the checkboxes appropriately). I am...
1
2656
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="<%$ ConnectionStrings:stellentConnectionString %>" SelectCommand="spWC_Adjusters" SelectCommandType="StoredProcedure" InsertCommand="spWC_Adjusters_Insert " InsertCommandType="StoredProcedure" UpdateCommand="spWC_Adjusters_Update"
9
2207
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 + DataAdapter, bind a DataGrid to the DataAdapter, that's it. Problem with that approach might be the hardcoded CommandString of the OracleCommand. Whenever somebody requests query string changes you have to adapt the C# code, to recompile and...
12
4725
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 variable in the url. I would like that variable to trigger a stored and
1
1438
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 options is AddQuery.Actually i am using that option.But i am not getting the createStoreprocedure option(means its not visiblemode).Iam using the existing storedprocedure but i am not getting procedureslist in the ComboBox.So any one please help me .Its...
1
1166
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; thisCommand.CommandType = CommandType.StoredProcedure; thisCommand.CommandText = "MyStoredprocedure"; As far as I can see how would you tell SqlDataAdaper that you will use a
0
9707
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.