HOW TO CREATE DATABASE:





Open your MySQL Command Line Client, If you enter the password during installation then it demand for the password on opening. Otherwise, screen look like this:













Firstly you need to create a database to hold all the tables.The syntax for creating database is:

CREATE DATABASE table_name;

Example: CREATE DATABASE student;

Your screen look like this:













Now, you need to tell your database to actually use the database you created by using:

USE database;

Example: USE student;

Your screen look like this:









HOW TO CREATE TABLE:





This is done with the help of this syntax:





CREATE TABLE table_name

( column name 1 datatype, column name 2 datatype

);





Example: CREATE TABLE stu_data

( student_name VARCHAR(20),

student_rollno. VARCHAR(10),

student_mobileno. VARCHAR(10)

);





To see the structure of the table use this syntax:



