SQL Server 2000 makes it easier to export data in XML, but it is troublesome to import and process XML data in SQL Server 2000.
If you refer to Books Online (BOL), you will find related entries, including OPENXML and OPENROWSET. All of these
How can I clear database logs without stopping? Here, we take a database SQL SERVER 2005 as an example. When the log file reaches more than 100 GB, it cannot be cleaned up and many methods have been taken:
For exampleSqlServer log clearing
In industrial control applications, the returned data is often stored in binary format, and the binary data represents a hexadecimal data content every 4 bits. During parsing, a single Byte usually occupies eight digits (bit). 4 bits at the top
Resets the oracle sequence from a specified number.Copy codeThe Code is as follows:DeclareN number (10 );V_startnum number (10): = 10000001; -- start from the numberV_step number (10): = 1; -- stepTsql varchar2 (200 );V_seqname varchar2 (200): =
Clustered index, data is actually stored in order, and the data page is on the index page. It is as if all topics are arranged in order in the reference manual. Once the data to be searched is found, the search is completed. For non-clustered
I think that I have tried to write SQL, and debugging is still helpful. When I read the SQL examples, I seem to have understood it. If I write it myself, I don't have to think about it correctly. The debugging works and the writing is concise.I
Database Replication is performed on two servers, the primary server and the backup server. After the primary server is modified, the backup server is automatically modified. This is described in detail in previous articles, this is not repeated
Whether int or varchar is used, it is hard to cope with multiple Status queries. For example, in general thinking, The Enum settings for CustomerStatus are as follows:Copy codeThe Code is as follows:[Serializable]Public enum CustomerStatus{New =
In database principles, clustering indexes are interpreted as follows: the order of clustering indexes is the physical storage order of data, while the non-clustering indexes are interpreted as follows: the index order is irrelevant to the physical
This article provides an SQL statement used to display queries between different databases on the same server. Note that the current connected user must have permissions for both databases.The complete expression of objects in SQL statements in SQL
1. cursor Mode Copy codeThe Code is as follows:DECLARE @ Data NVARCHAR (max)SET @ Data = '1, tanw, 2, keenboy '-- Id, NameDECLARE @ dataItem NVARCHAR (100)DECLARE data_cursor cursor for (SELECT * FROM split (@ Data ,';'))OPEN data_cursorFetch next
Copy codeThe Code is as follows:SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO/*By kudychen 2011-9-28*/CREATE function [dbo]. [SplitString](@ Input nvarchar (max), -- input string to be separated@ Separator nvarchar (max) = ',', -- a string that
Application Name: the Name of the Application. If it is not specified, its value is. NET SqlClient Data Provider ).AttachDBFilename/extended properties (extended attribute)/Initial File Name (Initial File Name): Name of the main File that can be
From SQL server help documentIt helps you optimize the query speed!RecommendedSp_executesqlInstead of using the EXECUTE statement to EXECUTE a string. Support Parameter replacement not onlySp_executesqlMore common than EXECUTE, and also
Every time this happens, I always say to myself: cups are not enough in my life. Because SQL Server installation is still complicated, you must first install it. net, Windows Installer, in the formal installation process also need to fill in a
Copy codeThe Code is as follows:Set ANSI_NULLS ONSet QUOTED_IDENTIFIER ONGoCreate PROCEDURE [dbo]. [SP_Pagination]/**//***************************************** ************************* Tens of millions of paging stored procedures ******************
Copy codeThe Code is as follows:-- Member tableIf object_id ('userinfo', 'U') is not nullDrop table userinfoGoCreate table userinfo (userid int primary key, user_tegral int, level int)Insert into userinfo select 1, 0, 0Go-- Member level tableIf
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 constants in addition to
[SQL]-- 1. Update the salary of each teacher to the original salary + bonus-- Defines two variables to store ttid and rewardDeclare @ tid intDeclare @ reward money-- 1. Create a cursor Based on the bonus tableDeclare cur_reward cursor fast_forward
A. truncates N characters from the left of the string.Declare @ S1 varchar (100)Select @ S1 = 'HTTP: // www.xrss.cn'Select Left (@ S1, 4)------------------------------------Result: httpB. Extract N characters starting from the right of the string
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.