the difference between 1,utf8_bin and Utf8_general_ci
CI is case insensitive, that is, "case-insensitive", A and a will be treated as the same in character judgments;
The bin is binary, and a and a will be treated differently.
For example you run:
You will often use your own ID in your project, such as UID, the simplest way is to use the auto_increment directly with the database, but if the user is very large, tens of millions of, hundreds of millions of and then need to be stored in the
First, clear the MySQL table data
Delete from table name;TRUNCATE TABLE name;Delete statements without a where parameter can delete all content in the MySQL table, and you can also empty the MySQL table with TRUNCATE table.Efficiency truncate
When you insert data into a table, you often encounter situations like this:
1, first judge whether the data exists;2, if it does not exist, then insert;3, if present, then update.You can write this in SQL Server:
Copy Code code as follows:
The function of binary log files
The MySQL binary log file is used to record all users ' operations on the database, that is, the SQL statements that record user operations on the database. If you have this file, when the database is an accident,
MYSQL get current date and date formatGet system Date: Now ()Format Date: date_format (date, format)Note: Date: Time fieldFormat: Date formats
Back to system date, output 2009-12-25 14:38:59Select Now ();Output 09-12-25Select Date_format (now (), '%
In the case of MySQL InnoDB, the preset tansaction isolation level is repeatable read, and there are two main ways to read locks in a select:SELECT ... LOCK in SHARE MODE SELECT ... For UPDATEBoth of these methods must wait for the other transaction
1, the primary key defined as the automatic growth identifier type
In MySQL, if the primary key of the table is set to the Auto_increment type, the database is automatically assigned the primary key. For example:
CREATE TABLE Customers (ID int
MySQL is a powerful open source database. With more and more database-driven applications, people have been pushing MySQL to its limits. Here are 101 tips for adjusting and optimizing MySQL installation. Some of the tricks are specific to the
This article explains how to use Ajax to query MySQL data, display the returned data in the pending list, and then select the final option to add to the selected selection, which can be used in many background management systems. The operation of
Import java.sql.*;
Import Java.text.DateFormat;
Database query public class Selecttable {String dbdriver= "com.mysql.jdbc.Driver";
String dburl= "Jdbc:mysql://localhost:3306/sss"; Change string username= "root" according to the actual
Use the exclamation mark (! A method that prohibits user terminals from entering.
Copy Code code as follows:
Mysql> grant all privileges in wubx.* to ' wubx ' @ ' 172.16.100.185′identified by ' fd52!wubx&, ';
Query OK, 0 rows Affected (0.00
It is no wonder that the 3 paradigm of database design, which was served as "the Bible" N years ago, has long been inapplicable. Here I have organized some of the more common database table structure design optimization techniques, I hope to be
Let's say how to migrate from SQLite to MySQL.
Get ready
First, you have to install the MySQL database. If you are using an Ubuntu system, please refer to this article. Other systems please refer to their respective documentation.
Export Current
If you're using a MySQL database, you'll have a great chance of keeping your password or other sensitive information in your application. Protecting this data from hackers or prying eyes is an important concern because you cannot allow unauthorized
In this section, let's look at the partitioning techniques in Mysql (RANGE, LIST, HASH)The Mysql partitioning technique is somewhat similar to the horizontal table, but it is a horizontal table at the logical level, and it is a table for the
Therefore, there are often such errors
Copy Code code as follows:
SELECT * FROM [IND] where indid>10UnionSELECT * FROM [IND] where indid
So far, there has been no question of
After that, maybe someone will use a similar query.
This example describes Python's implementation of a simple MySQL class. Share to everyone for your reference.
The implementation methods are as follows:
Copy Code code as follows:
#!/usr/bin/env python
#-*-Coding:utf-8-*-
# Created
The Echarts map is mainly used for visualization of geographic area data and displaying data distribution information of different regions. Echarts Official website provides maps of China, the world map and other map data download, through JS
Recently, when I studied my favorite scarf, I counted the number of days in love, which requires PHP to calculate on a daily basis, and here's a few ways to implement this date calculation:
(1) If there is a database is very easy! If MSSQL can use
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