I have a small problem.
I am creating an appointment table where in the foreign key is patient id which is referenced from patient table.This table is for all registered patients.
there will be unregistered patients also, who will be seeking appointments.SO i just need to store the name,phone and few details.
I don’t want to make these 2 as different tables.
So is there a way to skip the integrity check of foreign key when i ma inserting unregistered patient data
Create a new patient id for unregistered patients. Use a column to mark whether a patient is unregistered:
patient_registered ENUM( 'yes', 'no' )Alternatively, allow for NULL values in your
patient_idcolumn, and use NULL as the value for each patient row that refers to an unregistered patient.