- 1
Click the Windows "Start" button and select "All Programs." Click the "SQL Server" program group and then click "SQL Server Management Studio." This opens your main SQL Server console.
- 2
Click the database that contains your view. At the top of the console window, click the "New Query" button to open the SQL text editor and coding platform.
- 3
Type the following code into the editor (without the quotes):
"select * from [view]"
Replace "[view]" with the name of your view.
- 4
Press "F5," the keyboard shortcut to execute your SQL code. The view's information is displayed at the bottom of your window.
5/8/11
How to Use View in a Select Statement
Views are a feature of Microsoft's SQL Server. They let you create precompiled queries that return data similar to a table, and are used in place of common queries such as searching for a customer with all the customer's orders. You query a view in the same way you query a table.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment