What is the difference between a stored procedure and a view? why do we use views from SQL Server point of view? What are mutating triggers? How is the structure of a bit map index, clustered, Non clustered and B Tree What re mutating triggers? Can a stored procedure a record set? Can we use DTS on a client machine to schedule jobs and consolidate data to a sql tables? Can we have an update trigger within another update trigger?

Questions by mak1600

Showing Answers 1 - 5 of 5 Answers

A view is a virtual table.Which is given to the help of different users.

The view can be created at

Create view employee(name,no,salary,age) with encryption

As

select empname,empno,sal,empage from empmaster;

  Was this answer useful?  Yes

Hi,Can we run select query by joining virtual table (view or logical table) and actual table (physical)? Or it just doesnt make sense to do, and the same can be accomplished by joining the actual table itself.Thanks,-ashruf

  Was this answer useful?  Yes

vibha_kant

  • May 14th, 2007
 

Difference between a stored procedure and view:

Well both of them aren't even compatible to compare and tell the difference. They both belong to different paradigm of database world. Anyways, here are the definitions I would give you. A stored procedure is a set of sql statements which can be called a subroutine to access relational database systems. Its actually stored in a daatabase. They are mainly used for faster access(Pre-compilation of SQL statements) ,Simplification of data management and for security.

A view as my friends have elucidated above is a virtual or logical table that holds result set of a pre-defined query. The data for these views are not stored in the database. There are two types of view read only and updatable. You can modify a read only view with an INSTEAD OF trigger.

Hope that makes sense :-)

  Was this answer useful?  Yes

vibha_kant

  • May 14th, 2007
 

Mutating triggers :

I am not aware of mutating triggers in SQL Server.  Per my knowledge only MySQL and Oracle throws this error. Coming back to the point, mutating trigger occurs when the table which fired the triggering event is being accessed in the body of the trigger code, directly or indirectly through a nested trigger or procedure etc. This is not allowed as the table could be in a middle of transaction.

  Was this answer useful?  Yes

vibha_kant

  • May 15th, 2007
 

Clustered Index:

A clustered index reorders the way data is physically stored in a disc. Thats why there can be only one clustered index on the table. The leaf nodes of the index contains the data pages.

Non-clustered Index
:

A non-clustered index is an in which logical order of the index do not match with physical order of data stored. In this case the leaf node do not contains data pages but contains indexed rows.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions