day1_install and build database and table

 
 
 #First database and table 
create database library; use library; create table book ( id int primary key , book_name char (50 ) ); create table reader (id int primary key , reader_name char (50 ));

1. The installation uses the virtual machine Ubuntu16.04 LTS;

2. MySQL syntax is not case sensitive, and the end with a semicolon ";" indicates the end of a statement, and the carriage return represents a line feed;

3. Statements such as int (10) are 10 characters, not bytes;

4. Basic statement:

  create database <database name>;

  use <database name>;

  show databases;

    create table<表名>; 

  insert into employee(id,name,phone) values(01,'Tom',110110110);

  insert into employee values(02,'Jack',119119119);

  insert into employee(id,name) values(03,'Rose');

Guess you like

Origin www.cnblogs.com/tay1987/p/12731902.html