Database naming rules:Create Select cannot use numbers up to 128 bits maximum # Basically, it's like a python or JS naming convention.the SQL language is primarily used to access data, query data, update data, and manage relational database systems,
Multi-Table QueryReasons to use multi-table association queries: query data is published in several tablesMerging result sets :merging the result set is a two the query results of the SELECT statement are merged together, and the result set is a
A trigger (trigger) is a special stored procedure whose execution is not invoked by the program or manually, but is triggered by an event, such as when an operation on a table (Insert,delete, update) activates it for execution. Triggers are often
Description:Database, there must be no more statements. In the database, the data is stored in a uniform format as a "record". Mainly has the following characteristics:1, can be structured to store a large amount of data information, convenient for
Description:In a production environment, the security of data is critical, and any loss of data can have serious consequences. Therefore, it is important to back up data and restore data. Here are some things to do with backup and restore of data. ..
Main content:
Inserting data Insert
Updating Data Update
Deleting data Delete
Again to review some of the operations we have done before, I believe we all have a comprehensive understanding of inserting data, updating data,
First, the command line modeMySQL [(none)]> show databases; #未选择数据库前,显示(none)表示在数据库跟路径下+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || sys ||
Several commonly used build-table statements:1, the simplest to build the table statement:CREATE TABLE Table name (Column Name 1 data type (length),Column Name 2 data type (length),...)Such as: 2, with the primary key to build the table
One, logical backup1.mysqldumpBackup policy1. Logic Hot Standby2. Backup cycleKeep one week, log for one week, local backup3.crontabDirectory PlanningMkdir-p/mysqldump/{log,data,bash}Backing Up usersGrant SELECT On * * to ' bkusr ' @ ' 192.168.110.%
MySQL forgot the super user admin password, can take advantage of restarting the MySQL process with the--skip-grant-tables parameter to start the database, and a blank password login. This is the equivalent of the first time the database was started.
--Authorize a user (Zhangsan) password 123, you can do all the operations on all the libraries, all the tables.Mysql> Grant All on * * to [e-mail protected] '% ' identified by ' 123 ';Query OK, 0 rows affected (0.17 sec)-The refresh takes effect,
Index: A fast positioning technique that is equivalent to a book's catalog page. Function: Fast query data condition: Data entry is greater than 2000 CREATE INDEX id_index on info (ID); Create a normal index show index from info \g//View index drop,
Database is a very important part of information system, it is very important to manage it reasonably and efficiently. Typically, the total administrator creates a different administrative account, and then assigns different permissions to the
There are times when data collation needs to be specified for its own rules, such as 1>3>2>0, so you need to specify the collation when fetching data, as follows:SELECT ' user ' from the user WHERE ' User_status ' in (0,1,2,3) ORDER by FIELD (' User_
Brief introductionMySQL is a relational database management system developed by the Swedish MySQL AB company and is currently part of Oracle's product portfolio. MySQL is one of the most popular relational database management systems, MySQL is the
MySQL indexing is important to the efficient operation of MySQL, the index can greatly improve the retrieval speed of MySQL, database index is like a book full directory. Index divided into 5 categories
Normal index, which is the most basic
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service