0

Possible Duplicate:
Solutions for INSERT OR UPDATE on SQL Server
Check if a row exists, otherwise insert

I'm using SQL Server 2008 R2, C# .NET 4.0 (and LINQ).

I want to get or create a row in a table and then append a string to one of its columns.

I'm wondering if there's a best practice for this kind of idiom, or if SQL offers this out of the box?

Somehow transaction start -> select -> insert or update -> transaction end doesn't seem elegant enough...

Community
  • 1
  • 1
Howie
  • 2,760
  • 6
  • 32
  • 60

0 Answers0