我有这段代码,我想了解为什么在将空日期与非空日期进行比较时会显示“等于”。
如果我要进行更新并且发生这种情况怎么办?
Declare @OldDate date
Declare @NewDate date = '05/02/1960'
if(@OldDate <> @NewDate)
Print 'Different'
else
Print 'Equal'
关于埃里奥·费尔南德斯
答案 0 :(得分:3)
几乎所有与ui <- fluidPage(
titlePanel(h1("Fantasy Dashboard")),
sidebarLayout(
sidebarPanel(h2("Player Name Goes Here"),
selectInput("playername",
label = "Choose a player",
choices = player_choices,
selected = NULL),
),
mainPanel(plotOutput("graph"))
)
)
的比较都返回NULL
。在大多数情况下,NULL
被视为false。因此,您将变得不平等。
您未指定数据库。该标准支持NULL
-安全比较:
NULL
并非所有数据库都支持此语法,因此您需要更加明确;
@oldDate is distinct from @newDate