The operation process uses the laboratory building .
The first is to create a database Studentsystem, using the statement is: Create DATABASE Studentsystem; View the command to create a good database or show databases; To create a table in the created database Studentsystem, first connect to the database, using the statement use < database name >, where use Studentsystem ( no semicolon) is used.
The statement format for creating a new table in the database is:
Name of the CREATE TABLE table (column name a data type (data length), column name B data type (data length)); To create the following table:
The statement is: CREATE TABLE student (CID int), CNAME char (+), gender char (20));
Insert data into a table you can use the statement: INSERT into student (Cid,cname,gender) VALUES ("Tom", ' Male ') or insert into student values (' Tom ', ' male '); If you want to insert multiple lines at once, you can write:
INSERT into student values (' Tom ', ' Male '), ("", ' Rose ', ' Famale '), that is, omit the column names, and the values between each row are separated by commas, and end with a semicolon.
If you want to see the data in the table, you can use the statement: SELECT * from student;
MySQL creates a simple score management system