SQL Server: Creating a view in a database

350795 pts.
Tags:
SQL Server
SQL Server database
I'm fairly new to SQL Server so I'm wondering why I need to create a "View" in it? Wouldn't it make more sense to to just run a normal stored procedure? Thank you very much!

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

I have Google for this and found a helpful article for you
http://technet.microsoft.com/en-us/library/aa258253(v=sql.80).aspx I hope it
will assist you in resolving issues.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • hunshabbir7

    They are very different things.

    A stored procedure:
    * accepts parameters
    * can NOT be used as building block in a larger query
    * can contain several statements, loops, IF ELSE, etc.
    * can perform modifications to one or several tables
    * can NOT be used as the target of an INSERT, UPDATE or DELETE
    statement.

    A view:
    * does NOT accept parameters
    * can be used as building block in a larger query
    * can contain only one single SELECT query
    * can NOT perform modifications to any table
    * but can (sometimes) be used as the target of an INSERT, UPDATE or
    DELETE statement.

    2,000 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following