Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一种情况,如果它不存在,我想创建一个行,或者如果它存在则更新它。有没有一个很好的干净的方法来做到这一点是TSQL?
IF EXISTS (SELECT 1 FROM table WHERE ...) UPDATE table SET ... ELSE INSERT INTO table ...