CREATE
and TABLE
are SQL reserved words,
Place the name of the table after CREATE TABLE followed by () and then a semi colon ;
We will create a table like the one shown on the right called 'student'
CREATE TABLE student ( );
Now define the different attributes of columns inside the () parenthesis
The primary key will be student_id as how we reference the table
define the column names and data types seperated by commas ,
CREATE TABLE student ( student_id INT PRIMARY KEY, name VARCHAR(20), major VARCHAR(20) );
click run and an error will appear
Error: permission denied for schema public
Error Code: 42501
Follow the steps from section 1 lesson 4 installPOP step 8 at the end
our password for root user is password
the database created in terminal is db1
password