我创建了一个 EmpDB 并创建了一个表“EmpTable”,当我尝试创建一个简单的 SP 时,我收到编译时错误“无效的对象名称 dbo.EmpTable”——为什么?
以下是sql语句
use EmpDB;
Go
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE usp_GetEmpNames
AS
SELECT * FROM dbo.EmpTable