Collections:
ALTER VIEW - Modifying Existing Views in SQL Server
How To Modify the Underlying Query of an Existing View in SQL Server?
✍: FYIcenter.com
If you have an existing view, and want to change the underlying SELECT statement, you can use the "ALTER VIEW ..." statement to redefine the view. The tutorial exercise below shows you how modify an existing view:
USE FyiCenterData; GO ALTER VIEW fyi_links_top AS SELECT TOP 3 id, counts, url FROM fyi_links WHERE counts > 100 ORDER BY counts DESC; GO SELECT * FROM fyi_links_top; GO id counts url ------ ------- ------------------------------------------- 36470 999966 dgqnvmy pyjqd toqcoupuxortasdtzvcae jonfb 12292 999953 qebmw v qqmywe q kza wskxqns jnb 6192 999943 p o qisvrakk hk od
2016-11-04, 814👍, 0💬
Popular Posts:
How To Use GO Command in "sqlcmd" in SQL Server? "sqlcmd" is a command line client application to ru...
What Is Open Database Communication (ODBC) in Oracle? ODBC, Open Database Communication, a standard ...
How To Replace Given Values with NULL using NULLIF() in SQL Server Transact-SQL? Sometime you want t...
What Is a Constant or Literal in SQL Server Transact-SQL? A constant, or data literal, is a symbolic...
What Happens If the UPDATE Subquery Returns Multiple Rows in MySQL? If a subquery is used in a UPDAT...