Linked Questions
57 questions linked to/from How do I update if exists, insert if not (AKA "upsert" or "merge") in MySQL?
2
votes
3
answers
72k
views
How to check if value already exists in MySQL database [duplicate]
Possible Duplicate:
How do I update if exists, insert if not (aka upsert or merge) in MySQL?
I know this is pretty basic.. but for some reason this is not working for me. I have a form that ...
3
votes
2
answers
15k
views
If exists update else insert in one query [duplicate]
I have simple table like this:
+----------+---------------+-------------+
| ID (int) | KEY (varchar) | VALUE (int) |
+----------+---------------+-------------+
| 1 | asdf | ...
2
votes
2
answers
12k
views
INSERT if not Exist Mysql [duplicate]
I have this table
id follow_id follower_id
1 | 2 | 3
2 | 2 | 4
3 | 2 | 5
4 | 2 | 6
5 | 3 | 7
6 | 3 ...
6
votes
1
answer
8k
views
Update if exist, insert if not exist [duplicate]
Possible Duplicate:
How do I update if exists, insert if not (aka upsert or merge) in MySQL?
I have program that can do batch updating price for booking engine.
example user input for to do ...
1
vote
3
answers
16k
views
insert into mysql database, if records already exists, then update [duplicate]
Possible Duplicate:
How do I update if exists, insert if not (aka upsert or merge) in MySQL?
how to insert into mysql database, if records already exists, then update...I know there is a solution ...
1
vote
2
answers
8k
views
INSERT INTO only if not exists MYSQL [duplicate]
I'm currently insert data by the way of using SELECT and not VALUES as it is by default. The problem is that I can't find a way to insert data only if it's not in the database.
This is my current ...
0
votes
2
answers
728
views
update if exists [duplicate]
Possible Duplicate:
How do I update if exists, insert if not (aka upsert or merge) in MySQL?
I have a table with the columns user, category and score. I want to run an insert that, if this user/...
0
votes
1
answer
863
views
Update data if not exists, otherwise add to table [duplicate]
Possible Duplicate:
How do I update if exists, insert if not (aka upsert or merge) in MySQL?
I am creating a simple crawler gathering statistics from website. What I want to do is that if there ...
1
vote
1
answer
1k
views
Insert or Update MySQL database if 3 fields match [duplicate]
I have the following schema
CREATE TABLE `list` (
`name` text NOT NULL,
`value` text NOT NULL,
`id` int(11) NOT NULL,
`note` text,
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
and I would like ...
2
votes
2
answers
624
views
SQL - IF EXISTS UPDATE ELSE INSERT [duplicate]
I have the following query:
INSERT INTO distance (deviceID,datum,tavolsag)
SELECT
deviceID, DATE(FROM_UNIXTIME(timestamp)) as datum,
sum(case when distanceKM/1000<416 then distanceKM/1000 else ...
0
votes
0
answers
597
views
How to find if a key already exists in my MySQL database? [duplicate]
I have codes that players can redeem for in-game goods like currency. These codes are one time codes, once they are used they are inserted into the players MySQL row on my table.
How can I check if a ...
0
votes
0
answers
48
views
trying to use mysql update on insert [duplicate]
I have a data loading from an excel file where i am adding all the checks to check for the uploaded file and insert data accordingly, till this point everything seems to be working good.
Now i am ...
1
vote
0
answers
39
views
Determining if a value exists in MySQL column... Through Python [duplicate]
All right, this is a weird one. I know there are ways in PHP to do this, but this is via a connector that is connecting from an ancient database called "PICK" to MySQL. Essentially, I need to ...
0
votes
0
answers
23
views
Unknown system variable 'ROWCOUNT' [duplicate]
I need to insert the records that aren't existing in the table companies.
I'm using the @@ROWCOUNT method to check if it exists.
UPDATE companies SET `name`='<string>' WHERE `name`='<string&...
627
votes
19
answers
391k
views
UPSERT *not* INSERT or REPLACE
http://en.wikipedia.org/wiki/Upsert
Insert Update stored proc on SQL Server
Is there some clever way to do this in SQLite that I have not thought of?
Basically I want to update three out of four ...