Re: INSERT or UPDATE
- From: Michael Nemtsev <nemtsev@xxxxxxx>
- Date: Mon, 4 Jun 2007 13:56:48 +0000 (UTC)
Hello pxpilot,
It depends on your DB, some of them support MERGE (Oracle for example), which call either insert or update.
for SQL server you need to implement your SP, there is no merge afaik
---
WBR, Michael Nemtsev [.NET/C# MVP]. My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo
p> Hi All,
p> I have the a table with 2 fields: uid, date.
p> When the user does some activity I log his uid and the date, the
p> problem I have is that the table is not prepoulated with all uid's so
p> sometimes I need to INSERT and other times I need to UPDATE (if that
p> uid was already logged). Checking first with SELECT to see if the uid
p> exist is the obvious thing but I wonder is there a more effective
p> way?
p> App is ASP.NET 2.0 in VB
p> p> Thanks
p> PxP
.
- References:
- INSERT or UPDATE
- From: pxpilot
- INSERT or UPDATE
- Prev by Date: Firefox and Page Events
- Next by Date: Re: Request Object
- Previous by thread: Re: INSERT or UPDATE
- Next by thread: Re: INSERT or UPDATE
- Index(es):
Relevant Pages
|