检查是否数据库在SQL Azure中的存在与否 [英] Checking if database exists or not in SQL Azure

查看:112
本文介绍了检查是否数据库在SQL Azure中的存在与否的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

难道任何一个,请告诉我如何code数据库是否在SQL Azure中存不存在?

Could any one please tell me how to code whether a database exists or not in sql azure ?

推荐答案

你试过查询sys.databases中的表?这应该给你,你找什么。更多的信息在这里

Have you tried querying the sys.databases table? That should give you what you're looking for. More info here.

注意:您要运行针对Master数据库这个查询。否则,你只能看到当前数据库(和Master)的名称。

Note: You'll want to run this query against the Master database. Otherwise, you'll only see the name of the current database (and Master).

这篇关于检查是否数据库在SQL Azure中的存在与否的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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