You cannot do that in a single query, if your DB server supports stored procedures and passed parameters it would be posible to code a SP to handle the transactions.
otherwise your server side code will have to handle it
pseudocode:
SELECT id FROM table where id = [somevalue];
Code:
if id == null then
[run insert]
else
[run update]
end if
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|