Test the optimize today, found good, the following is the test process:create table ' Moe ' ( ' Phonenum ' varchar (one) NOT NULL, ' Citynum ' int (one) NOT NULL DEFAULT ' 0 ', ' phonetype ' int (one) default null, primary key ('
In a recent project, you need to implement a fuzzy query that makes multiple keywords for multiple fields in a single table, but these keywords do not necessarily exist in a field For example, existing table tables, which have title,tag,description
Architecture of MySQL DatabaseArchitecture of the InnoDBBackground process effect:1: Flush data to storage media in a timely manner2: InnoDB can return to normal when database exception is guaranteedVery similar to Oracle on the wholeBackground
first of all, to declare: In general, to modify the MySQL password, authorization, is required to have the root authority in MySQL. Note:This operation is at the win command prompt, phpMyAdmin also applies.User: Phplamp user database: phplampdb1.
Yesterday the project MySQL database upgraded from 5.5 to 5.6, causing some tables to be unable to update operations, reported the following error:1 inch inch as updates to transactional tables.MySQL official gives the solution:"Updates to tables
There are 3 types of databases supported by MySQL: numeric type, string (character) type, date and time type.First, the number type1. Integer type
Data type
value range
description
units
tinyint
MySQL lock mechanism for different engines:MyISAM and memory with table-level lock (Table-level locking)BDB with page lock (page-leve locking) or table-level lock, default to page lockInnoDB supports row-level locks (row-level locking) and
Differences between in and Fild_in_set ():Select ID, list, name from table where Find_in_set (' Daodao ', list)So if the list is a constant (such as: (' LIBK ', ' Zyfon ', ' Daodao '), you can use in directly, otherwise use the Find_in_set ()
Creating a Database command: Create DB mydata;//semicolon is not limitedTo create a table: First use the command using mydata;//to indicate that the next operation is performed under MyDataTo create a table:CREATE TABLE Dept (table name)(deptno int
Today when the database merge, found that due to previous operational errors, resulting in two of the library's self-increment has not changed, are the default starting from 1 since the increment, resulting in database merging times primary key
1. After successful installation, through phpMyAdmin into MySQL, click on the "User" menu above, in the user "root" host "localhost" click Edit permissions, there is an option "Change Password", enter the password you want, such as: 123456.2. Now
The self-join in the SELECT statement.So far, we've been connecting two different tables, so can we make a self-connection to a single table? The answer is yes.Is it necessary to make a self-connection to a single table? The answer is yes.Alias of
1. member table member and Vehicle table car, update the number of vehicles under each member Have_car field.DELIMITER $$ Use $$DROP PROCEDURE IF EXISTS' Sp_update_member_have_car ' $$CREATEPROCEDURE' Sp_update_member_have_car ' ()BEGIN
To modify the database character set:
ALTER DATABASE db_name DEFAULT CHARACTER SET character_name [COLLATE ...];
Change the default character set of the table and all character columns (Char,varchar,text) to the new
show databases //List MySQL Server database. show tables [from db_name] //lists the database data tables. show table status [from db_name] //lists data tables and table status
Clear, delete, and modify mysql tables
Individual Original: http://www.phpthinking.com/archives/365
I. Clear mysql table data
Delete from table name;Truncate table name;The delete statement without the where parameter can delete all content in the
MySQL Data Types
Note: The following content is applicable to MySQL and later versions.
MySQL has many data types. Selecting the correct data type is crucial for achieving high performance. This article is based on some blogs I have seen on the
Mysql help command (help information) Chinese annotation,
When a mysql-related fault occurs in the development or test environment, most of my friends may post on the Forum and discuss the problem with the QQ group. This method is one of the
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