SQL VALUES Keyword
The VALUES keyword is used with the INSERT INTO command to specify the values to be inserted into a new row of a table. You can insert values for all columns or for specific columns. Make sure that required (NOT NULL) and PRIMARY KEY columns are properly filled.
SQL VALUES Syntax
SQL
x
1
INSERT INTO table_name (column1, column2, ...)
2
VALUES (value1, value2, ...);
SQL VALUES Insert All Columns into Doctors Table Example
This query inserts a new row into the Doctors
table. Since existing doctor_id
values are 1–10, we will use doctor_id = 11
.
SQL
1
1
INSERT INTO Doctors (doctor_id, first_name, last_name, specialty)
2
VALUES (11, 'Anna', 'Santos', 'Cardiology');

SQL VALUES Insert Required Columns into Patients Table Example
This query inserts a new patient record into the Patients table with the specified patient_id, first name, last name, date of birth, and gender.
SQL
1
1
INSERT INTO Patients (patient_id, first_name, last_name, dob, gender)
2
VALUES (11, 'Carlos', 'Reyes', '2000-01-01', 'M');
