SQL Azure-如何从SQL Azure的主数据库中选择sysdatabases表? [英] SQL Azure - How can I select sysdatabases table from master database in SQL Azure?

查看:59
本文介绍了SQL Azure-如何从SQL Azure的主数据库中选择sysdatabases表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SQL Azure中,我尝试这样做:

In SQL Azure, I try this:

选择*从master.dbo.sys数据库中

select * From master.dbo.sysdatabases

并得到此错误:

此版本的SQL Server不支持引用'master.dbo.sysdatabases'中的数据库和/或服务器名称

Reference to database and/or server name in 'master.dbo.sysdatabases' is not supported in this version of SQL Server

我应该怎么做才能在SQL Azure中运行该查询?

What should I do to be able to run that query in SQL Azure?

推荐答案

您使用系统 view

You use the system view sys.databases (without the master qualification, it is not needed)

系统 sysdatabases 具有自SQL Server 2005(Azure是更高版本)以来不推荐使用,并且在任何情况下均为 Azure不支持

The system table sysdatabases has been deprecated since SQL Server 2005 (Azure is a later version) and in any case is not supported on Azure

这篇关于SQL Azure-如何从SQL Azure的主数据库中选择sysdatabases表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆