存储架构

Change focus of SQL Server Management Studio

微信扫一扫,分享到朋友圈

Change focus of SQL Server Management Studio
0

Day # 2 of SQL

I am trying to run a function that I made yesterday, but SMSS is looking at the "Master" database and not my "Metrics" database so it won’t run – it says "Invalid Object Name".

I know this is a simple question, but I’m not even sure what the correct term is. Do I need to change my "scope"? My "focus"? My "active database"? Not sure how to look this up on Google.

Add the line USE Metrics before your function call.

You can also change the database by using the dropdown list on the toolbar in the top left of Management Studio.

And of course, you can also fully qualify your call like this:

SELECT Metrics.dbo.splitstringcomma()

Adding USE YourDatabaseName at the start of all your scripts is a good habit to get into. That’s my own preference.

阅读原文...


Hello, buddy!

The Data Lake is Dead; Long Live the Data Lake!

上一篇

Vue组件库工程探索与实践之按需加载

下一篇

您也可能喜欢

评论已经被关闭。

插入图片
Change focus of SQL Server Management Studio

长按储存图像,分享给朋友