Use SET NOCOUNT ONBy default, the stored procedure returns the number of rows affected by each statement in the process. If you do not need to use this information in an application (not required by most applications), use the set nocount on
In many cases, exceptions or program errors may cause individual processes to occupy a large amount of system resources. to end these processes, run the following command to Kill the process:Alter system kill session 'sid, serial #'; However, this
First, a complex method is provided to compress logs and database files as follows:1. Clear logsDump transaction database name WITH NO_LOG2. truncate transaction logs:Backup log database name WITH NO_LOG3. Compress database files (if not compressed,
Next, let's make it a little more complex. What if there is an order by clause? Believe it or not, most databases will benefit from the index when using order.SELECT * FROM mytableWHERE category_id = 1 AND user_id = 2Order by adddate DESC;A little
/*Isn't 'bcp' an internal or external command or a program that can be run?Check whether the bcp.exe file exists in C: Program FilesMicrosoft SQL server80toolsbinn.Check whether the directory C: Program FilesMicrosoft SQL Server80ToolsBinn is added
The following is a very boring article, which is filled with a lot of encoding, conversion, client, server, connection ...... Well, I don't want to see it myself, but I think it makes some sense to write it down for four reasons:
MySQL 4.1 has
Create a notification Handler Now you can create a notification handler, which will use the sendNotificationThe process sends a change notification to the client. Let's take a look at the PL/SQL process orders_nf_callback in Listing 2.List
11.1. Column and column conversion-common
Assume that there is a student summary table (CJ) as follows:
Name Subject Result
Zhang San Chinese 80
Zhang San, mathematics 90
Zhang San physical 85
Li Si Chinese 85
Li Si mathematics 92
Li Si physical
10. SQL statement skills
1. A problem with an SQL statement: column and column Conversion
Select * from v_temp
The preceding view result is as follows:
User_name role_name
-------------------------
System Administrator
Feng Administrator
Feng
1. Description: copy a table (only copy structure, source table name: a new table name: B)
SQL: select * into B from a where 1 <> 1
2. Description: copy a table (copy data, source table name: a target table name: B)
SQL: insert into B (a, B, c)
1.1 who can connect and connect from there?
You can allow a user to connect from a specific host or a series of hosts. There is one extreme: If you know that a demotion is connected from a host, you can limit the permissions to a single host:
Grant
The following example shows how to optimize the performance of Multi-table joint query by using the information provided by EXPLAIN.
Assume that the following SELECT statement is used, and the EXPLAIN statement is intended to be used for detection:
Generally, no mysql support is provided for personal free homepage space, that is, it is also very demanding, so it is important to find a good alternative!PHP file processing is very powerful, so it can be replaced by file access!(When there is no
Today, a new server is configured with IIS php. when running the result, an error occurred while connecting php to the remote mssql database. The error code is as follows:Warning: mssql_connect (): Unable to connect to server:I think it was okay
Many of my friends asked me how to use a php program to connect to a common class of SQL Server database. In fact, this is not very difficult. The key point is to be careful, patient, and understanding with passion.Class DB {Var $ Host = "192.168.0.1
ODBC for PHP Databases
ODBC is an application programming interface (API) that allows you to connect to a data source (such as the MS Access database ).--------------------------------------------------------------------------------Create an ODBC
Public function insert ($ data){If (isset ($ data ['content']) &! Empty ($ data ['content']){$ Data_for_query ['content'] = trim ($ data ['content']);}Else{Return false;}If (isset ($ data ['user _ id']) &! Empty ($ data ['user _ id']){$
Share my methods. Only valid for SQL files exported by myadmin in the php tutorial
$ Dbfile = "test. SQL ";$ Content = iconv ("UTF-8", "gb2312", file_get_contents ($ dbfile ));// Obtain the created data// Remove comments$ Content = preg_replace ("/-
Mysql tutorial _ real_escape_string () function escape special characters in strings used in SQL statements.
The following characters are affected:
X00NR '"X1aIf yes, the function returns the escaped string. If it fails, false is
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