WHAT IS DIFF B/W VIEWS AND STORED PROCEDURE

Answer Posted / ruchi

A view is a virtual table that consists of columns from one
or more tables. Though it is similar to a table, it is
stored in the database. It is a query stored as an object.
Hence, a view is an object that derives its data from one or
more tables. These tables are referred to as base or
underlying tables.

Once you have defined a view, you can reference it like any
other table in a database.
CREATE VIEW view_name
[(column_name[,column_name]….)]
[WITH ENCRYPTION]
AS select_statement [WITH CHECK OPTION]
Where:


A stored procedure is nothing more than prepared SQL code
that you save so you can reuse the code over and over again.
So if you think about a query that you write over and over
again, instead of having to write that query each time you
would save it as a stored procedure and then just call the
stored procedure to execute the SQL code that you saved as
part of the stored procedure.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a serialized object?

538


What are the types of databinding?

554


What are the disadvantages of using datalist?

512


What is data view and variable view?

487


How will you fill the gridview by using datatable object at runtime?

550






What is ado.net object model?

514


Command objects uses, purposes and their methods.

521


Which is better ole db or odbc?

496


How to check if the Dataset has records ?

533


What is ado rdo dao in visual basic?

665


How can we serialize the dataset object?

561


Which method is used to sort the data in ADO.Net?

1507


oledbdataadpter with ms access in c#.net giving exception System.Data.OleDb.OleDbException while writing adapter.update(dataset,"tabname"); how to update the database from dataset?

1930


What are the rules to implement connection pooling?

508


Explain the dataadapter class in ado.net?

663