create mysql table with columns code example
Example 1: create table mysql query
create table tutorials_tbl(
tutorial_id INT NOT NULL AUTO_INCREMENT,
tutorial_title VARCHAR(100) NOT NULL,
tutorial_author VARCHAR(40) NOT NULL,
submission_date DATE,
PRIMARY KEY ( tutorial_id )
);
Example 2: how to create a table in mysql
-- 'CREATE TABLE' followed by the name of the table.
-- In round brackets, define the columns.
CREATE TABLE `test_table`
(
id INT(10) PRIMARY KEY,
username VARCHAR(50) NOT NULL
);