I need to insert a row into a table by selecting value from multiple tables. I want a row to be inserted from multiple tables.
insert into tab(id,name,date) values ((select max(id)+1 from tab),(select name from tab1),now());
Can you tell me how to do achieve this?
Whether this can be achieved by simple query itself or stored procedure is the only option?