1. Select the database you want to use (select the test database created in the previous article)
The existing database
Mysql>use test;
Select the test database;
2. Create a table
2.1column represents the name of each column, datatype represents the data type of each column (available data type: https://www.w3schools.com/sql/sql_datatypes.asp)
2.2 Creating a Table
Mysql> CREATE TABLE Persons (
-PersonID int,
LastName varchar (255),
FirstName varchar (255),
Address varchar (255),
-City varchar (255)
);
The request was successful!
3. Querying the table data (at this point we are creating a table that has no input data and therefore returns NULL)
column represents the name of the columns we are querying (using * for all information), TABLE_NAME represents the name of the table (i.e. persons)
Returns an empty table (no data)
W3Schools Official Document: https://www.w3schools.com/sql/sql_create_db.asp
(ii) MySQL: Learn SQL syntax on W3Schools documents (create a table using the database)