I have three tables with same fields and same field's name. Now I want to insert same data into three tables using only one insert query.
My tables are: temp1:
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| id | varchar(20) | NO | PRI | NULL | |
| name | varchar(20) | YES | | NULL | |
| address | varchar(20) | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
temp2:
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| id | varchar(20) | NO | PRI | NULL | |
| name | varchar(20) | YES | | NULL | |
| address | varchar(20) | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
temp3:
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| id | varchar(20) | NO | PRI | NULL | |
| name | varchar(20) | YES | | NULL | |
| address | varchar(20) | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
I want to insert same value for each table.
I have tried this code:
insert into temp1,temp2,temp3 values('abcd','sangho','rajpur');
Please help me. its really important.