SQL Azure-如何从SQL Azure的主数据库中选择sysdatabases表? [英] SQL Azure - How can I select sysdatabases table from master database in SQL Azure?
问题描述
在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?
推荐答案
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屋!