SQL Server Stored Procedure Failure?

I have a case-sensitive SERVER (SQL_Latin1_General_CP1_CS_AS), but the database is case-insensitive (SQL_Latin1_General_CP1_CI_AS).

If I try to create the following stored procedure in the database, I get the error message "Must declare scalar variable @test".

CREATE PROCEDURE [dbo].[sp_Test] (@TEST int) as
begin   
    SELECT @test
end
GO

But, as I said, the database itself is not case sensitive. I assume it is documented somewhere that stored procedures correspond to the sensitivity of the server, but I cannot find the link anywhere. Can someone point me where I will find some documents about this? (Yes, I tried Google, but I did not find anything)

+3
source share
1

. - .

(, , , ) . , , CI ( ).

SQL Server:

COLLATE (Transact-SQL)

, .

  • , , .
  • , , , .

    , , , , . . .

  • , GOTO, . .

    , GOTO, , , , .

, :

SELECT SERVERPROPERTY('collation');

SQL_Latin1_General_CP1_CI_AS
(1 row(s) affected)

.

+4

Source: https://habr.com/ru/post/1717252/


All Articles