视图

定义:

保存好的 select 语句。

一个虚拟表

创建:

if exists (select * from sysobjects where name = 'vv')   
 drop table Tab_EdsProd                                /*判断是否存在视图,存在则删除 */ 
 go                                                   /*防止出现批处理错误*/

CREATE VIEW vv 
with encryption                                     /*加上with encryption则不可修改视图,不加则可以修改视图*/
as 
select * from ceshi.dbo.[360_Mobile_Search]

go                                                 /*防止出现批处理错误*/

 

posted @ 2019-05-30 19:15  qsl_你猜  阅读(126)  评论(0编辑  收藏  举报