An initial knowledge of SQL language
SQL (structured query Language, structured queries language)
The SQL language is primarily used to access data, query data, update data, and manage relational database systems, which are developed by IBM. There are 3 types of SQL languages:
DDL statement Database Definition Language: Database, table, view, index, stored procedure, such as Create DROP ALTER
DML statement Database manipulation language: Inserting data insert, deleting data Delete, updating data update, querying data Select
DCL Statement Database Control Language: for example, to control user access rights grant, REVOKE
Second system database
INFORMATION_SCHEMA: Virtual library, do not occupy disk space, storage is the database startup parameters, such as user table information, column information, permission information, character information, etc.
Performance_schema:mysql 5.5 started a new database: Mainly used to collect database server performance parameters, record the processing of query requests occurred in various events, locks and other phenomena
MySQL: Authorization library, access information for primary storage system users
Test:mysql Database System Auto-created test database
Three Create a database
1 syntax (help CREATE DATABASE)
CREATE database name CharSet UTF8;
2 Database naming rules:
can be by letter, number, underscore, @, #, $ case-sensitive uniqueness cannot use keywords such as create select cannot use the number maximum 128 bits alone
Four database related operations
View database show databases;show CREATE DATABASE Db1;select database (); Select the databases use database name to delete database Dorp database name; ALTER DATABASE DB1 CharSet UTF8;
MySQL II: library operations