看个sql文的结果select '2015-12-03 23:59:59.999' + ' will stored into db like :' + convert(varchar, convert(datetime, '2015-12-03 23:59:59.999'),121)union allselect '2015-12-03 23:59:59.998' + ' will stored into db like :' + convert(varchar, convert(datetime, '2015-12-...【阅读全文】
SimilarityBoth the functions accepts two arguments to search the specified text filed in the given expression.Both the function returns the starting position of the matching pattern given in the function.DifferenceThe PatIndex function is used with the wildcard characters. You must enclosed t...【阅读全文】
简述一下2个SQL 是否有区别a) select * from g_cardapply where g_applydate like '2011-01-01%' ;b) select * from g_cardapply where g_applydate >= '2011-01-01 00:00:00' and g_applydate <= '2011-01-01 23:59:59;______________________________1______________________________方法a无法匹...【阅读全文】
迭代检索原理就是WITH语句做一个临时表【DAYS】,在UNION ALL的下半部分从【DAYS】临时表中检索YMD的前一天,当【DAYS】表中的YMD大于等于当前日期的前10天迭代停止WITH DAYS AS (SELECT CURRENT_TIMESTAMP AS YMD UNION ALL SELECT DATEADD(Y, -1, YMD) FROM DAYS WHERE DAYS.Y...【阅读全文】