MySQL Forums
Forum List  »  Newbie

why is this not working?
Posted by: Christian Eichert
Date: January 28, 2013 03:36PM

Why is this not working ?

table looks like this : columns nr INTEGER(6), text VARCHAR(64).....

It should be something like a AUTO_INCREMENT of column 'nr' who is a integer it should grab the highest nr , increment and set it new.

INSERT INTO `table` SET ( nr=MAX(nr)+1, text='bla bla')

how would it be corect?



Edited 1 time(s). Last edit at 01/29/2013 01:52AM by Christian Eichert.

Options: ReplyQuote


Subject
Written By
Posted
why is this not working?
January 28, 2013 03:36PM
January 29, 2013 12:55AM
January 29, 2013 06:35AM
January 29, 2013 07:40PM
January 29, 2013 07:42PM


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.