|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Insert with no existance check
Question...
I have an application in which there just exist certain rows in a table. Each time the program opens I have it insert the rows. I do not check that the rows already exist before adding the new rows. My theory is that checking first would require 1 round trip to the database to see if the records exist, and then another trip to and from the database to insert the record if it did not already exist. For a minimum of 1 round trip if the data already exists and two round trips if it does not already exist. Instead, by just issuing the insert statement, I will always end up with a maximum of 1 trip to the database. Anybody have a reason that I should check first instead of just inserting? |
|
#2
|
||||
|
||||
|
Does your MySQL version support REPLACE INTO?
|
|
#3
|
|||
|
|||
|
Quote:
This is the OP... Thanks for the suggestion, but MS-SQL does not support REPLACE INTO. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > Insert with no existance check |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|