Server|xml SQL Server and XML integration
Author: builder.com
Wednesday, June 2002 10:11 AM
XML is the latest solution for data storage. XML gives web developers greater programming flexibility than HTML. This new technology drives the
1:command call a stored procedure, if the output is dataset,selectcommand command object connection first point out, otherwise catch lifetime is empty.
2: The varchar field of the stored procedure if this format is x.x, it is easy to have subtle
For example:ID Name Value1 a pp2 a PP3 B III4 B pp5 B pp6 C pp7 C pp8 C IIIID is primary keyAsk for such a resultID Name Value1 a pp3 B III4 B pp6 C pp8 C IIIMethod 1Delete yourtablewhere [id] not in (Select MAX ([id]) from yourtableGroup BY (name +
For example:ID Name Value1 a pp2 a PP3 B III4 B pp5 B pp6 C pp7 C pp8 C IIIID is primary keyAsk for such a resultID Name Value1 a pp3 B III4 B pp6 C pp8 C IIIMethod 1Delete yourtablewhere [id] not in (Select MAX ([id]) from yourtableGroup BY (name +
SQL loops, in addition to cursors, are as follows --- create temporary table -- DECLARE @tradeID INT; --if not object_id (' Tempdb. #A ') is null -- drop table #A --create table #A ([tradeid]
Other precautions"The water can carry the boat, also overturn it", the index is the same. Indexes can help improve retrieval performance, but too many or improper indexes can cause system inefficiencies. Because the user adds an index to the table,
1. Select statement Constituent element 1.1 SELECT *Avoid using SELECT *When you want to list all columns in the SELECT clause, it is a convenient way to refer to ' * ' Using a dynamic SQL column. Unfortunately, this is a very inefficient approach.
Recently in the forum to see someone asked, how to quickly generate 1 million non-repeating 8-digit number, for this issue, there are a few things to note:
1. How to generate a 8-bit random number, the more random the generated number, the more
In the process of data warehouse development, we often need to insert a lot of test data to test the database query performance and calculate the storage space occupied. This article mainly introduces the tool that does not borrow the third party to
1. ORACLE Select * from TABLE1 Where rownum2. INFORMIX Select First N * from TABLE1 where 1=13. MYSQL Select * from TABLE1 where 1=1 LIMIT N4. DB2Select * Row_number () over (ORDER by COL1 DESC) as ROWNUM Where rownumor Select COLUMN from TABLE
Analyze and compare execution time plan reads1. View execution time and CPUSET STATISTICS Time Onselect * from Bus_devhistorydataset statistics time offYou can see it in the message after execution.2. View the operation of the query for I/OSET
Thanks to Sun Yunan's summary, address http://www.cnblogs.com/sunxiaonan/archive/2009/11/24/1609439.htmlFor example:ID Name Value1 a pp2 a PP3 B III4 B pp5 B pp6 C pp7 C pp8 C IIIID is primary keyAsk for such a resultID Name Value1 a pp3 B III4 B pp6
SQL statement for querying and deleting duplicate records1, look for redundant records in the table, duplicate records are based on a single field (Peopleid) to determineSELECT * from Peoplewhere Peopleid in (select Peopleid from People GROUP by
The project needs to use the Sybase database paging function, to do all kinds of methods are not successful, and finally use the following stored procedures to successfully implement the function, record the memo.CREATE PROCEDUREJsp_query_page@sql
Although the SQL statements for querying and deleting duplicate records are messy, the content is still good.
Although the SQL statements for querying and deleting duplicate records are messy, the content is still good.
For example:
Id name value
1
C # PASS Parameters to n methods of the thread,
[Transfer] http://kb.cnblogs.com/a/888688/
The topic in this article is about several methods for passing parameters to a thread.
First, we need to know what a thread is, when to use it, how to use it,
/*************************************** ***** **************************************** * ******************** Parameter description: 1. tables: Table Name, view 2. primaryKey: Primary keyword 3. sort: Sorting statement without Order By such as
Code of the tens of millions of paging stored procedures in sqlserver
Code for querying stored procedures by tens of millions of pages on SQL server
/*************************************** ***** **************************************** * **********
Copy codeThe Code is as follows:SET QUOTED_IDENTIFIER ONGOSET ANSI_NULLS ONGOAlter procedure usp_PagingLarge@ TableNames VARCHAR (200), -- table name, which can be multiple tables but cannot be aliases@ PrimaryKey VARCHAR (100), -- primary key,
Declare @ pageSizeint -- return the number of records for one night declare @ CurPageint -- page number (page number) declare @ Countintdeclare @ idintset @ pageSize10set @ CurPage1 -- locate if @ CurPage-1begin -- setrowcount @ pageSizeselect @
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.