MySQL Forums
Forum List  »  Newbie

Unique integer numbers an populate columns
Posted by: Johan Nieuwoudt
Date: August 15, 2018 02:00AM

I created a table with an auto increment id and just 3 columns named testno1, testno2 and testno3.
How do I use a sql statement to update the table with testno1 containing 500 random integers between 1 and 1000.
Column testno2 containing 300 integers between 1 and 1000, not in testno1.
Column testno3 containing 200 random integers between 1 and 1000, not in testno1 and testno2.
The resulting table should then consist of unique random integers between 1 and 1000 and the integers values should not have duplicates in the 3 columns.
The columns with lesser rows can contain null values up to row 500.

Options: ReplyQuote


Subject
Written By
Posted
Unique integer numbers an populate columns
August 15, 2018 02:00AM


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.