SQL Server:
SQL
Code
Copy codeThe Code is as follows: Select Top N * from Table order by newid ()
The newid () function creates a unique value of the uniqueidentifier type. The preceding statement reads N records randomly from the
1. The Concat function is often used to convert int to varchar. For example, the Concat (8, '0') string '80' is obtained'
2. Convert varchar into an int string of the varchar type using cast (A as signed).
Summary: type conversion is similar to
Perror 28
Error Code 28: no space left on Device
SQL statement execution error: Select title, Gid from blog_blog where date Error writing file 'C: \ windows \ temp \ my9b6f. tmp '(errcode: 28)
Solution:
1. Release c: \ windows \ temp \ Space
The premise is to be here: http://sourceforge.net/project/showfiles.php? Group_id = 42718 & package_id = 220409 & release_id = 649609
CopyCodeThe Code is as follows: Include ("ADODB/ADODB. Inc. php"); // contains the ADODB class library file
$
Mysqlnd is integrated in the PHP source code tree. Unlike libmysql, mysqlnd is more closely related to the kernel.
The official saying that memory usage is reduced by about 40%. The speed is also faster.
By the way, if the mysql_connect () [2002]
I. insert and replace Both insert and replace statements Insert new data into the table. The syntax of these two statements is similar. The main difference between them is how to process repeated data.
1. General insert usage
The insert
An important application is how to change the password when the root user password is forgotten. You can ignore loading the authorization table when starting the MySQL server.
MySQL uses a user name and password in many ways different from Unix or
1. Enter mysqladmin processlist In the MySQL/bin directory;2. Start MySQL and enter show processlist (kill ID of a thread is disabled ;);If you have the super permission, you can see all the threads. Otherwise, you can only see the self-initiated
Mysql> prompt \ U @ \ H (\ D) \ r: \ m: \ s>
\ U: connected to the user
\ H: connect to the host
\ D: connect to the database
\ R: \ m: \ s: display the current time
Mysql> prompt \ U @ \ H (\ D) \ r: \ m: \ s>
Root @ localhost (MySQL) 08:55:
CopyCode The Code is as follows: delimiter $
CreateFunction 't_gir'. 'func _ rand_string '(f_num tinyint unsigned, f_type tinyint unsigned)Returns varchar (32)Begin-- Translate the number to letter.-- No 1 stands for string only.-- No 2 stands
Example:
CopyCodeThe Code is as follows:
Generally, lazy is set to true instead of false, because if it is set to false, the corresponding sub-table will also be queried while querying the master table, added a lot
Cause: Microsoft released the TCP/IP update Patch (kb967723) on September 23, September 9. If the server enables automatic updates or the software for Automatic Updates is downloaded and updated, this problem occurs. Some may ask why the patch on
These problems may change the data value. In general, the above problem may occur when you use non-binary string data types (such as char, varchar, text, and other data types.
Aes_encrypt () and aes_decrypt ()
Aes_encrypt () and
After obtaining the requirement, I found that the MYSQL databases of both websites cannot be remotely accessed (security first ). This reminds me of the CSV files used for batch data input. Therefore
Try to import and export data using CSV.
The
MySQL Escape Character "\"
Mfc_basic
MySQL recognizes the following escape characters:
\ 0
An ASCII 0 (NUL) character.
\ N
A newline character.
\ T
A positioning character. Separator
\ R
A carriage return.
\ B
A return character.
\'
A single
/Usr/bin: mysql installation directory
Create a backup Folder:
Mkdir mysql_data_bak
Create a script file:
Touch autobackupmysql. sh
Open a file
Vi autobackupmysql. sh
Add the following content to the script:
Filename = 'date + % Y % m % d'
/
1. The index is not created;
2. SQL statements are too complex;
3. Configuration Error;
4. The machine cannot be loaded;
1. Index not created
If you see that mysql consumes a lot of cpu, you can use the mysql client tool to
1. Connect to the mysql database
1. Open cmd to enter the dos window.
2. Switch to the directory: D: \ MySql5.0 \ mysql-5.0.51b-win32 \ bin (that is, the bin directory under the mysql installation directory, which contains a lot of exe execution
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