For program developers, the two most popular background databases are MySQL and SQL Server. The basic similarity between the two is the data storage and the query system. You can use SQL to access the data for both databases, because they all
In my new function of using SQL Server2005 to construct a paging stored procedure, I mentioned using the Row_number () function instead of top to implement the paging stored procedure.
But the time is long, and found a new problem, is the master
When we need to bulk delete the tables in the database, whether a single delete some of the table is annoying, tired, simply write a script to use.
This script uses cursor looping to delete, and for a smaller number, cursors are not adversely
A typical example of two process deadlocks is: Get lock A In process T1, apply for lock B; Get lock B In process T2, request lock A, we'll do the following to demonstrate this situation:
1. Create a database named Invdb.
2. Execute the following
A few days ago "read" "Sqlserver2005 Advanced Program Design" and "The introduction of SQL Server 2008 Programming Classic (3rd edition)," The two translations of the Chinese version of the book. found that the directory structure is roughly the
A while ago the manager asked me if I could record the time that the user last logged into our business database because someone had modified the login password for the database SA user before, so we need to record it.
I checked the data, as if I
Master
The master database holds all databases that are placed on a SQL Server entity, and it is the glue that keeps the engine fixed. Because SQL Server does not start if you do not use the primary database, you must carefully manage the database.
Lock a table in a database
SELECT * from table with (HOLDLOCK)
Note: The difference between a table that locks a database
SELECT * from table with (HOLDLOCK)
Other transactions can read the table, but cannot update the deletion
SELECT * from
Copy Code code as follows:
--begin Index (index) analysis optimization related SQL
--Returns an index with more than 25% of the current database fragmentation rate
--Running this statement scans a lot of data pages
--Avoid running when the
--sql Regular substitution function
Copy Code code as follows:
CREATE function Dbo.regexreplace
(
@source ntext,--the original string
@regexp varchar (1000),--Regular expression
@replace varchar (1000),--Replacement value
Myth #4: DDL triggers (introduced after SQL Server 2005) are instead OF triggers
This is wrong.
The implementation principle of DDL triggers is actually an after trigger. This means that the DDL operation occurs first, and then the trigger
MySQL SQL Server mode
The MySQL server can operate in different SQL modes and can apply different modes for different clients. This allows each application to tailor the operating mode of the server to its own needs.
The schema defines which SQL
It is best to use bcp if you just need to insert data in large quantities, if you need to insert, delete, and update the proposed use of SqlDataAdapter I tested high efficiency, and in general, these two meet the demand
bcp method
Copy Code
A recent project because the server is in a special room, because of security considerations, we can not provide FTP services to our developers, so each updated version have to run their own, and his room is very far, so I have been thinking can
First, download the installation
1. SQL Server Express Edition
Download: http://msdn.microsoft.com/vstudio/express/sql/download/
After installing the database, set up the ICP/IP protocol to start, as follows:
(1) Open SQL Server Configuration
Sybase SQL Server is an RDBMS of a multiple-library architecture, which is broadly structured as follows:
1. The database
A database used by the server itself, or a database of Management servers and user databases. Sybase created four system
Use this statement frequently to view poorly-performing SQL statements:
SELECT creation_time N ' statement compile time '
, Last_execution_time N ' last Execution time '
, total_physical_reads N ' total number of physical reads '
, Total_logical_
--Query the number of tickets that a specified vendor has specified for a period of time
If every query one months, modify a time too troublesome, write a cycle!
DECLARE @date1 date
DECLARE @date2 date
DECLARE @startdate date
DECLARE @enddate
1th step. Import required link tables in SQL Server via ODBC
Step 2nd. Add in the load code of the startup form
This code:
Private Sub Form_Load ()On Error GoTo AEDoCmd.TransferDatabase aclink, "ODBC", "Odbc;driver=sql Server;" Server=server\yde;
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.