SQL Server reads XML files

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

SQL SERVER database log clearing text tutorial

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

Data conversion between binary and character types in SQL Server

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

Detailed description of how to reset a sequence from a specified number in oracle

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): =

Principles of indexing and precautions for Indexing

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

12 SQL statements and Data

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 performance test push Mode Performance Test

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

The bitwise operation function of SQL Server cleverly solves the multiple-choice Query Method

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 =

Differences between clustered indexes and non-clustered indexes in Databases

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

SQLServer cross-database query Implementation Method

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

Batch insert and update in SQL server (Stored Procedure)

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

Split string SplitString function in SQLServer

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

Optional collection of SQL Server database connection strings

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

How to Use sp_executesql stored procedure in SQL

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

Analysis of Automatic Installation of SQLServer using scripts

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

SQL Server code for querying stored procedures by tens of millions of pages

Copy codeThe Code is as follows:Set ANSI_NULLS ONSet QUOTED_IDENTIFIER ONGoCreate PROCEDURE [dbo]. [SP_Pagination]/**//***************************************** ************************* Tens of millions of paging stored procedures ******************

Use SQL scripts to create SQL Server database trigger example statements

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

Some differences between the insert into select statement and the select into from statement

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

How to share SQL cursor instances

[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

SQL truncation string function sharing

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

Total Pages: 923 1 .... 623 624 625 626 627 .... 923 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.