below to introduce the MySQL database introduction, details as follows:
Mysql
Database:
Oracle, DB2, SQL Server, MySQL, Access, Mangodb, bigtable
relational database
Large
Oracle, DB2
Medium - sized
SQL Server, MySQL
Small
Access
Start learning the database today, because I am not very cold to Microsoft, so do not use his home product originally wanted to install Oracle, but too big, look afraid for me this kind of like basics, MySQL is a good choice, about the big theory of
Use the MySQL CONCAT () function to concatenate two strings to form a single string. Try the following example:
mysql> SELECT CONCAT (' A ', ' SECOND ');
+----------------------------+
| CONCAT (' A ', ' SECOND ') |
+-------------------------
Today, I saw a very representative of the optimization case, here is a note to make a mark, to commemorate the casual field definition of the problem.
Recall that in the design of the table many people used to design the structure of the table into
In order to apply the scalability of the system, often need to scale out the database design, scale out design is to increase the database processing node to improve the overall processing capacity of the system, that is, increase the number of
An optimization of a complex associative SQL was processed yesterday, and this kind of SQL optimization often takes into account the following four points:
First, the result set returned by the query, usually the query returns few result sets, is
Phenomenon:
There is a table action_conf, the data is as follows:If you want to get a en_name record that starts with exp_site_10_, how do you write the SQL statement?
So easy!
Select En_name from action_conf where en_name like '
MySQL's date function. Current date in Example:Curdate () is June 24, 2013.Year (): Show yearsMysql> Select Year (Curdate ()); +-----------------+ | Year (Curdate ()) | +-----------------+ | 2013 | +-----------------+ 1 row in Set (0.01 sec)MONTH ():
First, the installation of MySQL
Running the MySQL installer (mysql-essential-5.1.40-win32.msi)
Select Install type is Custom
Click the Change button to modify the installation directory
Change installation directory to D disk (can be
Looking for some information, and then I used the MySQL string processing of two functions concat () and left ()
1, CONCAT (str1,str2,...)
Returns a string from the argument's link. Returns null if any argument is null. can have more than 2
In many cases, the database defaults are null, but the case is that the database values are empty rather than NULL when the program is processed. Note When a unique index is created, when the database will empty as multiple duplicate values, and the
This article describes the MySQL use of Group_concat merged with a number of data display methods, to share with you for your reference. The implementation methods are as follows:
Suppose there is such a requirement:1: Class table:ID class_name2:
Copy Code code as follows:
SELECT * FROM _test a LEFT join _test B on a.id=b.id where a.level= ' and a.month= ' and b.level= ' 03 ' ;
Select a.*,b.* from (SELECT * to _test where level= ' and month= ') as a LEFT join (SELECT * from _test
MySQL installation is often found not normal boot encountered the most error 2003 errors, the following is the solution:
Mysqld-nt-remove
Mysqld-nt-install
Restart MySQL
net start MySQL
There may also be a problem with the service 1067
Table A
Aid adate
1 A1
2 A2
3 A3
Table B
Bid bdate
1 B1
2 b2
4 b4
Two tables A, B connected, to remove the same ID field.
SELECT * from a INNER join B on a.aid = B.bid
This is the only matching data to be fetched.
At this point,
Detect if event is turned on
Copy Code code as follows:
Show variables like ' Event_scheduler ';
2. Open Event
Copy Code code as follows:
Set global Event_scheduler = on;
3. Create a stored
Create triggers. The syntax for creating triggers is as follows:
CREATE TRIGGER trigger_name trigger_time trigger_event
On tbl_name for each ROW trigger_stmt
Where the trigger_name identifies the trigger name and is specified by the user;
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