I. test environment:
1. Database: SQL Server 2008
2. Test Table: 15000 records, char primary key, no other indexes
3. Test Field: ntext type, maximum Data Length: 12000
Ii. Test statement:
1. Select * From producttemp where productdesc
If not object_id ('class') is nullDrop table classGoCreate Table class ([Student] nvarchar (2), [mathematical] int, [physical] int, [English] int, [Chinese] INT)Insert classSelect n 'Li si', Union allSelect n 'zhang san', 87,90, 82,78Go
-- 2000:
Environment
: OS: window2000 Server
Database: SQL Server 2000 Chinese Enterprise Edition
+
SP4
Both the customer and service are running on one machine. The customer's management system encountered the "[odbc SQL Server dirvier] timeout
1. Statistical functions AVG, Count, Max, Min, Sum
For most Parties, null rows are not counted. It can be used with distinct to remove duplicate rows. Can be grouped with group
2. mathematical functions
SQRTCeiling (n) returns the smallest
Reference: http://www.yesky.com/searchdatabase/504969436818571264/20050524/1951934.shtml
Overview: SQL statements of the Microsoft SQL Server database are imported and exported, including data imported and exported with other databases and
Document directory
The result is:
[Reprinted]
In some statistical reports, row results are often displayed in columns. Here we use a common score report for each course of students to demonstrate the actual implementation method.The
/*************************************** ************************ File: fncompare. SQL** Name: fncompare** Description: compare two strings, return the alike degree with the percentage.Compares two strings and returns the percentage of similarity.**
Today, we will summarize all SSIS articles into one article and make a simple directory for easy searching.
SSIS is an intelligent solution of Microsoft, popular and ASP. net program, it also designed a lot of similar controls, but called tasks, the
-- Cause Analysis: -- The servername attribute of the serverproperty function is similar to that returned by @ servername. The -- servername attribute provides the names of Windows servers and instances, which constitute a unique server instance. --
-- SQL Server database recovery steps after doubt -- 1. recovery Procedure: --. back up the smlog_log.ldf file to another directory. -- B. rename the smlog_log.ldf file in the source directory to smlog_log_bak.ldf; -- C. run the following
Different methods in SQL 2000 and 2005
Let's talk about
Create Table # temp1
(
Id int not null,
Code varchar (10) Not null
Primary Key (ID, code)
)
Insert into # temp1 (ID, code) values (1, '01 ')Insert into # temp1 (ID, code) values (3, '01
1. Find an SQL Server server disc, find the directory "MSDE" on the disc, run the setup. EXE file, and install it as required by the program. After the installation is complete, restart the computer.
2. Run the Autorun. open the installation
A problem to be solved recently is to run a workflow on an OA system. After running a workflow, you need to write the batch of form data to the HR system. I want to write a small tool for synchronization, but I have to worry about the real-time
I. Overview of Indexes
1. Concept: a database index is a structure that sorts the values of one or more columns in a data table, just like a directory in a book, indexes provide the ability to quickly query specific rows in rows.
2. Advantages
In the previous blog, we learned and summarized the stored procedure. Today we learn a special stored procedure-trigger. As the name suggests, a trigger is executed when an event is triggered. At present, we also summarize the three aspects of its
[Optimization] 34 SQL Optimizations
We must not only write SQL statements, but also write SQL statements with excellent performance. The following section describes how to learn, extract, and summarizeShare the information with you!(1) select the
Problem description:Table TB:ID values----------------------1 aa, BB2 AAA, BBB, CCC If you want to split the values column, the result is as follows:ID value-------------------1 aa1 bb2 aaa2 bbb2 ccc 1. Old SolutionSelect top 8000Id = identity (INT,
Question: assume that the structure of a table is (student ID, name, email address)
Check whether there are duplicate students; check whether there are duplicate email addresses; and finally count the number of students on different email servers,
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.