I am making a report today, but I did not pay attention to it at first glance. I checked it carefully. It turns out that I want to count the sales volume for a certain period of time in a sales detail list in SQL Server and compare it by week, I had
SQL Server 2005 T-SQL: CTE
Concept:Common table expression (CTE) is a common table expression.
Usage:It is difficult to deal with SQL statements of previous versions, such as paging and recursive queries...
Basic usage:
With ()As()Select
Reference Source: http://sqlforums.windowsitpro.com/web/forum/messageview.aspx? Catid = 74 & threadid = 47900 & enterthread = y
When using a database, we sometimes need to know the disk space occupied by the database. In the past, the disk space
If the default value of a column is set when a table column is added dynamically,
If you use the alter table tablename drop column columnname statement, an error is returned,
For example:
"Message 5074, level 16, status 1, 1st row object 'df _
How to copy a table using t_ SQL statements
I have a database datahr and demo in SQL Server 2000. Their structures are the same. Other tables are named gbitem. now I want to copy all the contents of the Table Name: gbitem of the demo database to
-- Obtain the version number of MS SQL
Execute master .. sp_msgetversion
-- Obtain the hard disk file information-- Parameter description: directory name, directory depth, and whether to display filesExecute master .. xp_dirtree 'C :'Execute
Baya pavliashvili
07.31.2003
Rating: --- (out of 5)
Reseeding identities in SQL Server identity columns are commonly used as primary keys for SQL Server tables. if you're not familiar with identity columns, they are automatically
C # create an SQL Server database
After creating a database connection object, we canProgramUse it. First, we dynamically create an SQL Server database in C # in the program. We create the database in the C: \ mysql directory. to practice this
The databases used by the company's SharePoint system share the same database with other applications. During the planning period, due to lack of experience, only the size of the content stored in SharePoint was taken into account, and the log size
Cursors are evil!
In relational databases, we think about queries in a set. The cursor breaks this rule and changes the way we think about it into a row-by-row approach. For C-like developers, this approach is more comfortable.
The normal way
For XML Path some people may not know. In fact, it shows the query result set in XML format, with this feature, we can simplify our query statements to implement some work that may previously need to be completed through the function live storage
A recent project is about the synchronization of different databases. Considering the timeliness of dataProgramAdded multipleactiveresultsets to the database link string;
Multipleactiveresultsets is used to specify whether the result set of
Basic knowledge of SQL server indexing (1) --- basic format of record data [from] http://blog.joycode.com/ghj/archive/2008/01/02/113290.aspx
As I needed to train my colleagues on database indexing knowledge, I collected and sorted out this series
Address: http://www.cnblogs.com/lzrabbit/archive/2012/04/22/2465313.html
ArticleGuide
SQL query for where in
Use charindex or like to implement where in parameterization
Use exec to dynamically Execute SQL to implement where in
SQL Server Index Structure and usage (III)Author: freedk
I. An in-depth understanding of the index structureIi. Improve SQL statements
General paging display and storage process for small data volumes and massive data
Creating a Web application
Second kill is no stranger. Second kill is more of a reflection on concurrency for our programmers. It may be a genius to consider how to make a second kill to sweep the "second kill ". The last day was invited to optimize the SQL statement for the
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.