Skip to main content

Questions tagged [insert-update]

A mixed flavour of data entry mode and data modification mode. It can be used when insert is required for case of non-existing data and modification if data exists.

insert-update
44 votes
5 answers
72k views

Does DB2 have an "insert or update" statement?

From my code (Java) I want to ensure that a row exists in the database (DB2) after my code is executed. My code now does a select and if no result is returned it does an insert. I really don't like ...
Mikael Eriksson's user avatar
12 votes
7 answers
36k views

How do I Insert or Update (or overwrite) a record using NHibernate?

I need to write a row to the database regardless of whether it already exists or not. Before using NHibernate this was done with a stored procedure. The procedure would attempt an update and if no ...
g .'s user avatar
  • 8,220
49 votes
7 answers
26k views

Is there a way to do an "INSERT...ON DUPLICATE KEY UPDATE" in Zend Framework 1.5?

I would like to use ON DUPLICATE KEY UPDATE in Zend Framework 1.5, is this possible? Example INSERT INTO sometable (...) VALUES (...) ON DUPLICATE KEY UPDATE ...
danielrsmith's user avatar
  • 4,060
2 votes
4 answers
10k views

Insert/Update on SQL Server 2005 without using Stored Procedures

I'm trying to do the classic Insert/Update scenario where I need to update existing rows in a database or insert them if they are not there. I've found a previous question on the subject, but it ...
Paul Fedory's user avatar
6 votes
5 answers
2k views

SQL - Table Design - DateCreated and DateUpdated columns

For my application there are several entity classes, User, Customer, Post, and so on I'm about to design the database and I want to store the date when the entities were created and updated. This is ...
Adam Asham's user avatar
  • 1,519

15 30 50 per page
1
84 85 86 87
88