Copy codeThe Code is as follows:SELECT a. 'table _ scheme' AS DB_NAME, a. 'table _ name', a. 'table _ ROWS ', a. 'Engine' --, .*FROMInformation_schema. 'tables 'aLeft join information_schema. 'table _ CONSTRAINTS 'BON a. 'table _ name' = B. 'table _
-- Note: personal study notes are displayed in the ascending order of BANK_ID + OP_DATE.Copy codeThe Code is as follows:-- Test DataCreate table # TB (id varchar (10), BANK_ID VARCHAR (10), OP_DATE VARCHAR (10), OPERATOR_NO VARCHAR (20), amt decimal
I. Basic ConceptsThe event concept was introduced in MySQL. The event is a time trigger, which is different from triggers event triggering. The event is similar to a linux crontab scheduled task for time triggering. It can be used independently or
Mysql storage engine myisam, innodb, and memoryMemory will be introduced laterInnodb supports transactions, foreign keys, and row locks. mysql does not.Innodb does not support fulltext index typesInnodb does not save the specific number of
1. mysql transactions
In MYSQL, only INNODB Data Tables support transaction processing.
There are two ways to start a transaction:
(1)Use begin, rollback, and commit to implementCopy codeThe Code is as follows:Start a transactionRollback transaction
Copy codeThe Code is as follows:-- Create a linked serverExec sp_addmediaserver 'Connection server name', '', 'sqlodb', 'remote server name or IP address'Exec sp_addmediasrvlogin 'linked server name', 'false', null, 'linked Server Username ',
1. MySQL support
1.1 MySQL module support
By default, the MySQL module is not included.
The opensipsctlrc file contains the database configuration information. To enable opensips to support mysql databases
It is necessary to support the mysql module.
Fields defining the UNIQUE constraint cannot contain duplicate values. You can define a UNIQUE constraint for one or more fields. Therefore, UNIQUE can be defined at the field or table level, fields with UNIQUE constraints can contain null values.
A subquery is a nested query statement in another query statement.
Query results of the inner query statement, which can provide query conditions for the outer query statement
In certain circumstances, the conditions of one query statement must be
Reference Table
Count () is used to count the number of recordsCopy codeThe Code is as follows:Mysql> select count (*) from score;Mysql> select count (*) from score where stu_id = 901;
Sum () summation FunctionCopy codeThe Code is as follows:Mysql>
The memory table is a table in the memory. The size of the memory used can be calculated by using My. specify max_heap_table_size in cnf. For example, max_heap_table_size = 1024 M. The memory table is different from the temporary table. The
1. if many rows are inserted from the same client at the same time, use the INSERT statement containing multiple values to INSERT several rows at the same time. This is faster than using a single-row INSERT Statement (several times faster in some
The development environment of a company is usually deployed on the Intranet, and then there will be public servers for developers and tests. Therefore, there is often a need to connect to the server through ssh or a local mysql client, in my
1. Open mysql workbench and select "Create EER Model From Existing Database" in the middle of the homepage "Data Modeling ";2. In "Stored Connection", select "Manage Stored Connections ...";3. Select "New" in Manage DB Connections to create a
Perform a detailed analysis on mysql Query Cache from five perspectives: Query Cache working principle, how to configure, how to maintain, how to determine the Query Cache performance, and suitable business scenario analysis.
Working Principle
The
Source: mysqlpub.com
MySQL has two functions to calculate the number of rows affected by the previous statement. Unlike SqlServer/Oracle, do not cause functional problems due to this difference:
1. Use the found_rows () function to determine the
1. InstallationCopy codeThe Code is as follows:./Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite -- enable-ssl
Apache now has a pseudo-static function called built-in pseudo-static.
2. If there is no -- enable-rewrite
Query data for the current week SELECT name, submittime FROM enterprise where yearweek (date_format (submittime, '% Y-% m-% D') = YEARWEEK (now ());Query last week's dataSELECT name, submittime FROM enterprise where yearweek (date_format (submittime,
Mysql is often used in the development process to export and import Chinese tables. This article will detail how to use it. If you need it, refer1. Export data for utf8 first:(1) Export all tables of the source database:Copy codeThe Code is as
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