Using SELECT Statements on Views in SQL Server

Q

Can SELECT Statements Be Used on Views in SQL Server?

✍: FYIcenter.com

A

Select (query) statements can be used on views in the same way as tables. The following tutorial exercise helps you creating a view and running a query statement on the view:

CREATE VIEW myLinks AS SELECT * FROM fyi_links 
   WHERE url LIKE '%fyi%'
GO

SELECT tag, counts, url, created 
   FROM myLinks ORDER BY counts DESC
GO
tag     counts  url                     created
DBA     972     dba.fyicenter.com       2007-05-19
SQA     728     sqa.fyicenter.com       2007-05-19
DEV     120     dev.fyicenter.com       2006-04-30

 

Using SELECT Statements and GROUP BY Clauses in SQL Server

⇒⇒SQL Server Database Tutorials

2016-10-26, 311👍, 0💬