I am trying to update/insert a record into the table depending on whether it
exists in the table or not.
Something along the lines of...
IF (SELECT id FROM myable WHERE id="myid")
INSERT INTO mytable(id,name) VALUES ("myid", "myname")
ELSE
UPDATE mytable SET name="mynewname" WHERE
I am trying to delete records from a table, where the 'id' to be deleted should only
happen if a certain flag (status) exists.
The table contains one or more records for the same id, only the flag changes.
I have tried
create temporary table temp (id int not null);
select id from tracking w
Hi,
Is it possible to put comments against a table and column that are persistent; so that
when you run 'explain' or 'describe', these comments will display.
Rob
I am new to MySQL so don't laugh!
I have a table 2 fields that relate to another table (that stores the
description)
i.e
history
id
status1
status2
statusText
id
details
How can I join the history.status1 and history.status2 fields to the
statusText table? in order that I can display
id