ylbtech-SQL Server: SQL Server-SQL 视图(View)基础 |
SQL 视图(View)基础。
1,ylb:视图(View)基础返回顶部 |
-- ============================================= -- ylb:“视图的基本创建于操作” -- 17:23 2011/12/13 -- ============================================= use pubs go --1,创建一个视图 create view VTitles as select * from titles go --2,查看“VTitles”视图,和查看表一样 select * from VTitles go --3,移除"“VTitles”视图" --drop view VTitles go --4,把“VTitles”视图"的名字更改为“VVTitles” sp_rename VTitles,VVTitles go --更改成功! select * from VVTitles go select * from users go sp_rename users,yuanbo