Is there a possibility in MySQL to fill specific number of columns in record by random values, except of ID (which should be auto-incremented)?
Something like that:
INSERT INTO 'table_name' ('ID', column1, column2, ...)
VALUES (<auto-increment> , random-value1, random-value2, ...);
Yes. The ID has to be declared as auto_increment and not listed in the insert statment. Rand() returns a float between 0 and 1.
create table my_table( id int primary key auto_increment, val1 float, val2 float ); insert into my_table( val1, val2 ) values ( rand(), rand() ); select * from my_table;