| Assembly | SqlServer.Rules.dll |
| Namespace | SqlServer.Rules.Design |
| Class | AvoidIfInStoredProcRule |
| Id | SRD0063 |
| Friendly Name | Avoid wrapping SQL in IF statement |
| Category | Design |
| Ignorable | true |
| Applicable Types | Procedure |
Do not use IF statements containing queries in stored procedures.
Avoid wrapping sql statements in stored procedures with IF statements. Consider extracting the nested sql statements to their own stored procedure.