經安全檢測,此網站為安全網站,請放心前往原始網址!

SQL Server 2008 - IF NOT EXISTS INSERT ELSE UPDATE - Stack Overflow

If clockDate is NOT datetime field (just date), then the SQL engine will do it for you - no need to cast on a set/insert statement. IF (NOT EXISTS(SELECT * FROM Clock WHERE clockDate = '08/10/2012') AND userName = 'test') BEGIN INSERT INTO Clock ...

stackoverflow.com

網址安全性掃描由 google 提供