single-table querysyntax for single-table queriesSELECT Field,.. From table name (must have)WHERE constraints (not necessarily)Group By field is grouped by field (not necessarily, if not, as a whole group)Having after having the filter condition
In order to facilitate the performance of testing, table and other work, it is necessary to establish a larger data table. I'm going to build a tens of millions of user tables here first. Step: 1 Create a data table (MyISAM mode storage insert speed
respect for the original: http://blog.csdn.net/abc19900828/article/details/39501643Dynamic SQL statement Basic syntax1: Normal SQL statements can be executed with execEg:select * from TableNameExec (' select * from TableName ')Exec sp_executesql n '
1. Explain analysis methodexplain {SQL}; Parsing query statements(1) The greater the number of ID column, the first execution, if the number is the same size, then from the top down to execute(2) Select_type query type: Simple, primary, dependent
Today, when querying the data, a small problem is that when querying data with TP5.0, a function is needed find_in_set for the purpose of this function is to give an example first:There is an article table with a Type field, which stores the article
Due to my 1045 error, no solution was found on the internet, I could not restrain myself from being irritable, I uninstalled it directly and then reinstalled it.Uninstall process:
sudo rm/var/lib/mysql/-RDelete a MySQL data file
sudo rm/etc/
1. Create a databaseCREATE DATABASE []db_name[ [DEFAULT]CHARACTERSET [=] [DEFAULT] [= ] collation_name];[] means you can omitExample:CREATE DATABASE IF not EXISTSDb1DEFAULT CHARACTER SETUTF8;CREATE DATABASE IF not EXISTSDb2DEFAULT CHARACTER
Data types in MySQL (String type)Character Typedata types in the six databaseschar, varchar, text, Blob,enum,setChar and varcharchar fixed length: Disk space is wasted, but high efficiency, determine the length of the data is the same, the use of
About Char,varchar and text usually do not care too much, in general, probably now everyone is using varchar. But when the content to be stored is larger, what is the choice between varchar or text? I don't know......text, char, varchar are the data
The test is as follows:Add a reference first: MySql.Data.dllLink: http://pan.baidu.com/s/1dEQgLpf Password: bnyu① creating a MySQL database link1 //build a MySQL database link2 Publicmysqlconnection getmysqlconn ()3 {4
1.mysql installation conflict: Conflicts with file from the packageSee "Conflicts", is a conflict, the file "/usr/share/mysql/charsets/*" needs mysql-server-5.6.19-1.linux_glibc2.5.x86_64 version, And the system already exists mysql-libs-5.1.71-1.el6
How to allow remote connection to MySQL database, the operation is as follows:First login account
Mysql-uroot-p
Using a MySQL user
Use MySQL
If you report this type of error: Error 1820 (HY000): You must SET PASSWORD
MySQL Data Security systemHttp://www.yunweipai.com/archives/23036.htmlNext I will introduce to you from four aspects, how the database through some configuration to achieve data security.
Stand-alone security
Cluster security
Backup
Well... These days to do a phased personal project, because personal reasons lead to time is not enough, the project time is a little tight, do not do well. Here are some of the problems that have been encountered in this project1. Instantiate the
MySQL pre-compilation function details, MySQL compilation function details
This article shares with you the MySQL pre-compilation function for your reference. The specific content is as follows:
1. Benefits of pre-Compilation
You have used the
Mysql-innoDB-transaction,Transaction isolation level:
Read uncommitted (uncommitted read)
At this level, the modifications in the transaction are visible to other transactions even if they are not committed, and the transaction can read
Mysql database or tablespace use query, mysql database tablespace
Directly add statements
Check the space occupied by all databases
Select TABLE_SCHEMA, concat (truncate (sum (data_length)/1024/1024, 2), 'mb') as data_size,
Concat (truncate
Queries whether all tables in the specified database contain specified fields and database fields.
Today, we encountered a problem: to update the values of a field in the database in batches, we need to first find the tables that contain this field,
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