1. Log in to the database>mysql-h localhost-u root-p Database name2. Querying all the databases>show databases;3. Select a database>use database name;4. Querying all data Sheets>show tables;5. Querying the table for field information>DESC table name;
Database Summarydisadvantages of traditional record data: Hard to save, backup difficult, inconvenient to finddatabase: A warehouse that stores data that describes the basic information of a transactionPros: 1. Persisting storage2. Very high reading
I first into the blog park, the initial blog, in the next time will be a little bit to improve the level of their blog, as well as the layout of the blog.Today, I learned the basic knowledge of MySQL database, I believe that there will be a lot of
SQL: Called Structured Query Language, it is internally divided into: DML statements: Data manipulation language, for increment (insert), delete (delete), check (select), Change (update) DDL statement: Data definition language for data storage,
1. Create a database table:CREATE TABLE table_name (fields_name1 datatype,fields_name2 datatype ...);2. View the table:Show tables;3. Create a table with the main health constraint (including Tangokian and multi-character types)1. Single KEY
MySQL Modify table syntax=========================Add column [Add column name]=========================①alter table name Add column list Type column parameter "Add column to last face of table"Example: ALTER TABLE test add username char (a) not null
One. JavaScriptA.tab Bar ToggleThe main highlight of tab switching is an exclusive idea.Main Ideas (1. First obtain the required elements, and then loop through the event by binding;2. Then two cycles, with the aim of setting a uniform style for all
"Database MySQL"Role:Save dataSuch as:1. Your open room record2. Bank card information3. Identity card InformationDatabase includes1. Library2. Table3. Fields4, Data line"Relational database and non-relational database"Interview questions often test
Database-mysql
The default super AdministratorUser name: RootPassword: rootThe localhost 127.0.0.1 all indicate that the nativeIdentifier
Pk:primary Key (column is part of a PK) primary key
Nn:not Null (column is nullable) non-null
First, the grammar requirements
SQL statements can be written single-line or multiline, ending with a semicolon.
You can use spaces and indents to enhance the readability of your statement.
Keywords are not case-sensitive.
Ii.
SQL Syntax composition? DML (Data manipulation language-action languageQuery, insert, delete, and modify data in the database; SELECT, insert, UPDATE, delete, and so on;? DCL (Data Control Language)--to control access permissions, access rights, etc.
Database operations:1. Create a database and modify the default character encodingCreate database name [charset= character encoding];Ee:Create Database dog Charset=utf8;Ps:1.1. If the database already exists, an error will be made. You can create a
MySQL common command one, user managementWhen the IP address is a paragraph, you can use the wildcard%, i.e. ' 192.1638.1.% 'Create userCreate user ' username ' @ ' IP address ' identfied by ' password ';Delete UserDrop user ' username ' @ ' IP
SQL Usage tips in Oracle:
Use | | As a connector, for example:
selectlast_name| | job_id as "Employees" from Employees;
When adding aliases to a column, you can enclose it in double quotation marks, which keeps the alias in lowercase,
Modify the syntax of a table=========================add column [Add column name]=========================①alter table name Add column list Type column parameter "Add column to last face of table"Example: ALTER TABLE test add username char (a) not
Parisgabriel every day to write one day a decision to persist for a few years for the dream to start a picture of faithtable field Rename (change)ALTER TABLE name change formerly known as new name data type;SQL queryExecution Order:3. Select ...
1. View the table's basic structureabbreviated DESC table name;Null: null value is available for storageKey: Whether the column is indexed. The PRI indicates that the column is part of the primary key of the table; Uni indicates that the column is
One, MySQL 's software architectureA) turn on MySQL server: Open in the form of Windows service, under cmd net start mysql|net Stop MySQL, use mysqld –default-file= "D:/amp/mysql/my.ini" under cmdb) connect to MySQL serverc) MySQL command, help,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.