the cursor is evil! In a relational database, our thinking about queries is set-oriented. The cursor breaks this rule, and the cursor makes us think in a progressive way. For developers of Class C, this way of thinking will be more comfortable.The
Objective:This chapter focuses on SQL Server Profiler (Profiler), which analyzes the effect of a statement's operation through a sniffer.--sql Server Profiler['PR?? Fa?l? (R)]ProfilerSQL Profiler is a graphical interface and a set of system stored
In level tenth we see the internal structure of the index, and at level 11th we see the potential negative impact of the balance tree structure: index fragmentation. With the knowledge of the internal structure of the index, we can examine what
meta-data functions 1. Get the database identifier DB_IDThe DB_ID function is used to get the unique ID (int data type) of the current database, and the database ID is used to uniquely differentiate the library on the server.Syntax structure:db_id (
The requirement is that there are more than 2000 tables under the Stock library in SQL Server. Each table is required to delete one of today's error data.First you have to get the names of all the tables, the code is as follows:Select from Where
Original: SQL Server replication SubscriptionTags: SQL server/mssql server/Database/dba/High performance solution/high availabilityOverviewConfiguration replication without database mirroring and AlwaysOn requirements is so high, only two servers
Background environment:Two servers, configure 4u (per U6 core), 48G memory, install a good system;Problem:SQL Server clusters cannot be installed properly, and the cluster does not support 24-core CPUs.Workaround:After the CPU is changed to 8 cores,
Today is just the data show, using the column change, there are many ways to change the line, pivot is one of them, Povit is the function of SQL Server 2005,The following business scenario:Each month, the total quantity of the incoming channel is
Today is just the data show, using the column change, row to column there are many ways, pivot is one of them, Povit is the function of SQL Server 2005,The following business scenario:Each month, the total quantity of the incoming channel is "totals"
Introduction to Casewhen UsageThe previous blog used Casewhen to solve the problem of data aggregation, then this blog I will briefly describe the use of case.The expression form of casewhen1. Simple Case function2. Case Search function--case search
A trigger is a one-day T-SQL statement that SQL Server automatically executes in response to any of the following statements. Delete,insert,update. Tables and views support triggers. (but temporary tables are not supported.)What business scenarios
The Import and Export service for SQL Server 2008 enables data conversion for different types of database systems. To allow users to use the import and export service more intuitively, Microsoft provides the Import and Export Wizard. The Import and
1, temporary use method OpenRowsetA. Using OPENROWSET with SELECT with Microsoft OLE DB Provider for SQL ServerThe following example uses Microsoft OLE DB Provider for SQL Server to access the authors table of the pubs database on a remote data
Recently, in the interview, met a wonderful bald old man interview officer.Q: Have you ever written a stored procedure paging?A: not written, but I know the principle of paging storage, I wrote it myself, just did not write at work.Q: So you haven't
Sum is the amount of content that is added, and count counts the number of table row objectsWhen you use a case, such asSelect Subject,Count (case if score>80 then score else null end) Excellent,Count (case if score59 then score else null end)
The sysprocesses table holds information about the processes running on Microsoft®sql Server™. These processes can be either client processes or system processes. sysprocesses are only stored in the master database.Column name Data type
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.