I have 120 student in 4 class A,B,C,D in student table : Id_student, Name, Class and I have a payment table: Id, Id_student, Class, Payment, Date_payment, Status How i asking how to insert All student in class A with status not_complete
multiple insert data in one table
70 Views Asked by Roymond Chandra Pradana At
2
There are 2 best solutions below
0
On
insert all into payment values(R1001,'A',"not complete") into payment values(S1002,'B',"not complete") into payment values(T1003,'C',"not complete") into payment values(T1003,'C',"not complete") into payment values(Z1003,'D',"not complete") ............ Update payment set class='A' where class in('B','C','D'); SELECT Id_student, Class, Status FROM payment WHERE Class = "A";
Refer this link for more information.