XML is added to SQL Server. the Modify () method is xml. modify (insert), xml. modify (delete), xml. modify (replace) corresponds to XML insert, delete, and modify operations.The following XML is used as an example to describe three DML
Some database statements may not be used much at ordinary times. Therefore, it is difficult to query the database over the Internet when using the statements. On the CSDN forum today, I saw these statements, and I copied them, I tried to copy the
I have written several stored procedures in my recent work and need to pass strings to the stored procedures. Because SQL Server 2000 does not have built-in functions similar to split, I have to handle them myself, it is very troublesome to split a
How does SQL Server configure email sending?Generally, we all know that SQL Server and Microsoft Exchange Server are well integrated. The configuration in this regard is described in detail in SQL Server's online help and will not be repeated here.
Misunderstanding #16: multiple data corruption and repair misunderstandingsMany of the popular versions are incorrect.I have heard a lot about what data restoration can do, what cannot be done, what can cause data corruption, and whether the damage
Misunderstanding #21: database corruption can be solved by restarting SQL Server or Windows, or attaching and detaching a databaseErrorNo operation in SQL Server can repair data corruption. Damaged pages must be repaired or restored through some
Deleting a message will cascade the reply information. At this time, we need to use the transaction, as shown in the following SQLCopy codeThe Code is as follows:Alter procedure [dbo]. [proc_tb_leaveword_delete](@ LeavewordID INT,@ Record TINYINT
When the analyzer looks for a path, it does not count the number of rows and ranges of values contained in the index every time, instead, the information is created and updated based on certain conditions and saved to the database. This is the
The Code is as follows:EXEC sp_rename 'table name. [original column name] ', 'new column name', 'column'Transact-SQL referenceSp_renameChange the name of the user-created object (such as a table, column, or user-defined data type) in the current
However, sometimes, you can view the logic of the process and write the three into a trigger, only to make a slight judgment.You can determine from the following method whether the trigger is triggered by processing the insert, delete, or
Isnull is used in database queries, especially when the statement is connected.For example, if a field has no value but needs to be left connected to another table during connection, it will be empty,Isnull can be used to determine whether it is
SQL SERVER Data Storage Format
Before talking about several different reading methods, you must first understand the SQL SERVER data storage methods. the minimum unit of SQL SERVER storage is Page ). the size of each page is 8 KB. SQL SERVER
In fact, not only will the table be locked as described above, but there are also many scenarios that will cause a deadlock in the Table. Unlocking is actually very simple. The following example is used to explain:1. First create a test table:Copy
Sometimes some XML data is processed in the stored procedure. Therefore, sp_xml_preparedocument is used to read the XML data and analyze it using the MSXML analyzer (Msxmlsql. dll. We can easily get the data we want in XML in the stored procedure.
Table replication:1. insert into select statementStatement format: Insert into Table2 (field1, field2,...) select value1, value2,... from Table1The target table Table2 must exist. Because the target table Table2 already exists, We can insert
First, run the following code in the query Analyzer of the Enterprise Manager. (Note that the user name used to enter the query analyzer must be System administrator and the database owner of each database ):Copy codeThe Code is as
Copy codeThe Code is as follows:SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCreate procedure [dbo]. [Pagination]@ Page int = 1, -- current Page number@ PageSize int = 10, -- number of records per page (page size)@ Table nvarchar (500), -- Table
A while ago, the manager asked me if I could record the last time the user logged on to our business database, because someone had previously modified the logon password of the database sa user, so we should record it.I checked the information. It
Misunderstanding #4: DDL triggers (introduced after SQL Server 2005) are INSTEAD triggers
This is wrong
The implementation principle of DDL triggers is actually an AFTER trigger. This means that a DDL operation is performed first, and then the
How to Use CONVERT:Format:CONVERT (data_type, expression [, style])Note:This style is generally in the time type (datetime, smalldatetime) and string type (nchar, nvarchar, char, varchar)It is used only when they are converted to each
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