本文介绍了区别((SELECT ISNULL(columnName,CONVERT(DATETIME,'January 01,1900',101)))= CONVERT(DATETIME,'January 01,1900',101))和columnName = null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 在SQL Server 2005中,有什么区别 (( SELECT ISNULL( columnName, CONVERT ( DATETIME ,' January 01,1900', 101 )))= CONVERT ( DATETIME ,' January 01,1900' , 101 )) 和 columnName = null 我可以替换 [(( SELECT ISNULL(columnName, CONVERT ( DATETIME ,' 2009年1月1日', 101 )))= CONVERT ( DATETIME ,' January 01,1900', 101 ))] with [columnName = null ] ? 解决方案 您可以在sql server management studio中运行第一个查询的组件。 这将让您对最终查询的作用有一个了解。 你好, ISNULL函数用指定的替换值替换NULL。您的查询只是双重检查列的空值。您可以安全地删除此条件。而是使用 columnName IS NULL 。 问候, In SQL Server 2005, What is difference between((SELECT ISNULL(columnName,CONVERT(DATETIME,'January 01,1900',101))) = CONVERT(DATETIME,'January 01,1900',101)) and columnName = nullCan I replace [((SELECT ISNULL(columnName,CONVERT(DATETIME,'January 01,1900',101))) = CONVERT(DATETIME,'January 01,1900',101))] with [columnName = null]? 解决方案 You can run the components of the first query in sql server management studio.This will give you a fair idea of what the final query is doing.Hello,The ISNULL function replaces NULL with the specified replacement value. Your query just double checks the nullness of a column. You can safely remove this condition. Instead use columnName IS NULL.Regards, 这篇关于区别((SELECT ISNULL(columnName,CONVERT(DATETIME,'January 01,1900',101)))= CONVERT(DATETIME,'January 01,1900',101))和columnName = null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-12 20:35