Reading notes quick cleanup of SQL SERVER2012 database content for Zblog programs using T-SQL statements

Source: Internet
Author: User

Recently used Zblog+sql server to build a blog system, using an ASP program, because my data is very small, using plug-ins to generate HTML files, there is no need to use PHP, and I said last time, PHP blog program has some problems, very consumption of resources, And the amount of data can not be done very big, more important is static or can not resist the impact of traffic.

Environment configuration: Windows Server server +zblog ASP program +sql SERVER2012 database + domain name (Impressions http://www.simayi.net Reading notes) + reading subject.

Well, the following is still about my recent study of T-SQL statements, because I am small white, for the database processing capacity is limited, recently to delete a column under the data, for testing, and began to be deleted, but found the difficulty is very large, the workload is very much, so the use of database statements batch processing.

Statement: SELECT * from dbo.blog.category where cate_id = 21, OK, such a statement can be batch query column id=21 all the data, found that 6,504.

Statement: Delete from dbo.blog.category where cate_id = 21, this statement can delete all the data under the column id=21, after execution, found that 6,504 data has been successfully deleted.

Visible, knowledge is power, through a simple answer to learn, we found that can be completed in batches so much content, the importance of learning, any time learning knowledge is useful, is not too late, live to learn old!

Reading notes quick cleanup of SQL SERVER2012 database content for Zblog programs using T-SQL statements

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.