找不到对象,因为它不存在或您没有权限.SQL Server 中的错误 [英] Cannot find the object because it does not exist or you do not have permissions. Error in SQL Server
问题描述
我有一个数据库,并且有一个 Sql 脚本,可以将一些字段添加到数据库中名为Products"的表中.
I have a database and have a Sql script to add some fields to a table called "Products" in the database.
但是当我执行这个脚本时,我收到以下错误:
But when i am executing this script, I am getting the following error:
Cannot find the object "Products" because it does not exist or you do not have permissions
为什么会发生错误,我应该怎么做才能解决它?
Why is the error occurring and what should I do to resolve it?
推荐答案
您确定您正在针对正确的数据库执行脚本吗?在 SQL Server Management Studio 中,您可以在其中一个工具栏上的下拉框中更改正在运行查询的数据库,或者您可以使用以下命令开始查询:
Are you sure that you are executing the script against the correct database? In SQL Server Management studio you can change the database you are running the query against in a drop-down box on one of the toolbars, or you can start your query with this:
USE SomeDatabase
这篇关于找不到对象,因为它不存在或您没有权限.SQL Server 中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!