I have students table as below
I want to create a new table certificates using SQL query where it will have certid as primary key auto incremented and rollno and marks should come from students table as foreign key (correct me if I am wrong) like below: