This introduction is only the most basic and most common operations.
First, the database operations:
①show databases; view the database Daquan
②create database -; creating a database
③use -; switch databases
④drop database -; delete the database
Second, the table operation:
(1) global operations
①show tables; see Table Book
②create table - (Column Name Data Type Notes create tables
……);
③describe table -; View header
④alter table - add defined among the columns add column
change the original column name column name renamed
⑤drop table - Delete table
(2) Data Manipulation
①insert into - values (~, ~ , ~); insert data
②select ~ from - where ~; see data
③update - set column name 1 = '~' where 2 column name = '~' modified data
④delete from - where ~; deleted data
⑤truncate table -; Data Clear Form
Third, the overall operation of the data table summarizes the comparison operation
Modifying header and modify data referred to as "modified", but is a global modification, is a modification of the contents data.
Action statements confusing, so in this comparison lists some simple statements.