如何在SQL 7.0及2000上创建查看表

来源:互联网 发布:sql union all用法 编辑:程序博客网 时间:2024/04/28 14:30
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

想像一下把查看表当作数据库里的另一个表格。查看表常常指的是虚拟表格,因为数据库里没有物理表格:查看表仅仅是一个返回能在SQL中使用的结果集的“存储查询”。这样查看表就能作为SQL查询的一部分被使用和更新了。

查看表不仅仅是SQL服务器的特性,它还被大多数现代关系型数据库管理系统提供。我将把SQL服务器7.0/2000作为例子,因为使用企业管理器界面来管理查看表是非常容易的。

企业管理器让有足够权限的用户能够在日常任务中创建、修改和使用查看表。一旦掌握了如何使用查看表,你就会怀疑没有它们你以前是如何过来的。

管理SQL服务器里的查看表

企业管理器提供了一种管理数据库里查看表的简单方法。A显示的是企业管理器应用程序窗口。

图A

"/i/developer/story/200212/39102693/image001.gif" target="_blank">点击放大 <script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击