MSSQL checks whether the statements used meet the standards

Source: Internet
Author: User

Check whether the statements used are standard
/*
There are a lot of differences between standard SQL and T-SQL-too much, not here. Also, if you work on SQL Server,
Therefore, using these private extensions is advantageous. Because of the nature of many SQL server features, if you do not use non-standard commands,
There will be many powerful functions that cannot be implemented. If you want to see if your SQL meets the standards, you can use set fips_flagger
Command
*/
Set fips_flagger 'level'
/*
'Level'
Compliance level with FIPS 127-2 will check whether all database operations have reached this level. If the database operation conflicts with the selected ISO standard, Microsoft SQL Server generates a warning.
Level must be one of the following values.
Value description
Entry checks whether it complies with the ISO entry-level standards.

Full
Check whether it complies with ISO full-level standards.

Intermediate checks for compliance with ISO intermediate standards.

Off
Do not check whether the standard is followed.
*/

/*
Set fips_flagger is set during analysis, rather than during execution or runtime. The setting during analysis means that the Set statement takes effect as long as it appears in the batch processing or storage process.CodeWhether the execution actually reaches this point is irrelevant, and the Set statement takes effect before any statement is executed. For example, assume that the Set statement is in if... else statement block, but never reached the statement block during execution, but because of the analysis of if... else statement block, so the set statement still takes effect.

If set fips_flagger is set in the stored procedure, the value of set fips_flagger is restored after the stored procedure returns control. Therefore, the set fips_flagger statement specified in dynamic SQL statements is invalid for any statements after dynamic 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.