Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are SQL stored procedures case sensitive?

for example...

ALTER PROCEDURE [dbo].[Reports_Dashboard_Get_Sav]   
    -- Add the parameters for the stored procedure here
    @startDate datetime,
    @endDate datetime,
    @companyID int=null

set @days=datediff(m,@startdate,@enddate)
if (@days)=0 
    set @days=1

This is not my code but if this is case sensitive then @days is not going to be calculated properly as the startDate/startdate and endDate/enddate variables don't match...

like image 650
MetaGuru Avatar asked Feb 03 '09 20:02

MetaGuru


1 Answers

They can be, depending on your database's collation. When you install SQL Server and choose your default collation, you'll notice that there's a "case sensitivity" checkbox. Certain collations are case sensitive and will affect your queries (and stored procedures).

Worse still, many vendors don't test their products on servers with case sensitive collations, which leads to runtime errors.

like image 182
Matt Hamilton Avatar answered Sep 22 '22 09:09

Matt Hamilton