MySQL Forums
Forum List  »  MySQL Workbench

renaming data
Posted by: robert bakaric
Date: September 06, 2008 12:35PM

hi,

how can i insert some data into table if that data is not in some second table. here is what i'm thinking about:
/
insert into tablename (GO) values ('dataxx') select ID from secondtable where secondtable.ID not in (select ID from thirdtable)
/
so i want to insert into 'tablename' 'dataxx' if 'ID' from the 'secondtable' does not exist in the 'trird table'.

dataxx is for example letter X

thank you
r

Options: ReplyQuote


Subject
Views
Written By
Posted
renaming data
3796
September 06, 2008 12:35PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.