1. Syntax IntroductionThere are three tables A, B, and C. Now we need to query the values of several fields from Table B and Table C and insert them to the corresponding fields in table. In this case, you can use the following statement:Insert into
Use mysqldrivercs to connect to the MySQL database
Download and install mysqldrivercs first. Address:
Http://sourceforge.net/projects/mysqldrivercs/
Find mysqldriver. dll in the installation folder, and add the mysqldriver. DLL to the project.
Environment
The MySQL version installed on my local machine is 5.1.30
The installed versions on the server are 5.1.7 and 5.0.22.
Error
Back up SQL statements on the local machine and execute them on the server. An error is always reported
1. Connection operations and Set Operations (continued)
Since MySQL does not support full join, I can do this:
Select * FromALeft JoinBOnA. ID=B. IDUnionSelect * FromARight JoinBOnA. ID=B. ID
A. First find the left join
B. Right join
By default, MySQL search is case-insensitive (however, some character sets are always case-sensitive, such as Czech ). This means that if you use col_name like 'a % 'for search, you will get all columns starting with a or.
If you want to make the
My MySQL is installed in c: \ mysql. I. Change the password. The first method is as follows: 1. If the root user has no password, C: \ mysql \ bin> mysqladmin-u Root Password "your password" 2. Change the password of the root user if it is 123456 C:
Command for backing up MySQL databaseMysqldump-hhostname-uusername-ppassword databasename> backupfile. SQLBack up the MySQL database in the format of a table with deletionBacking up a MySQL database is in the format of a table with deletion, so that
# Common basic operations for Structured Query Language in MySQL:/* DDL (Data Definition Language) Data Definition Language */# Create a database:Create Database 'database name' charset utf8;# Delete a database:Drop database 'database name ';#
If you change different servers for phpMyAdmin like me, you need to modify the config. inc. if you are bored with PHP and want to have a better user experience when debugging SQL, you can try this tool-mysql-Front (a full-featured 30-day trial, and
MySQL table type (and Character Set)
MySQL Set Application Skills
MySQL string functions
Simple use of PdO in PhP5
[Recommended] What is the difference between MySQL int (1) and tinyint (1? MySQL Boolean and tinyint (1) Mysql Data Types int,
Read more
Summary
Permission
Allow Internet access
Column Operations
Modify column name
Modifying column attributes in MySQL
Others
Automatic completion and UTF-8 encoding for Logon Settings
Others
The preceding sections describe how to create and index tables for normal mysql users, as well as the optimization that can be done by writing queries. However, there are some optimizations that can only be completed by the MySQL administrator and
Tools used
MySQL5.022VS2005 Team SuiteMySQL Connector Net 5.0.3EMS SQL Manage 2005 For MySQL
Friends who have used MySQL know that there is a garbled problem, and this problem is caused by incorrect encoding;Suppose you want to create a simplified
Mysql query method analysis summary:
In other words, the article table article stores the time when an article is added as the add_time field, which is of the int (5) type, to query the total number of articles added today in descending order of
In the reverse engineering of CYQ. Data framework, there are two more MySQL problems. Record them first.
1: The default value of time is CURRENT_TIMESTAMP. Two dates in a table cannot be set: CURRENT_TIMESTAMP.
Solution:
Set only one.
However,
Select * from account where userName like 'ad % '; select * from account where userName> = 'ad' and userName
The results of these two queries are the same, and the efficiency seems to be similar. No specific efficiency test is conducted. If you
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