We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ErikEJ/SqlServer.Rules'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
SML033.md•1.1 KiB
# SQL Server Rule: SML033
| | |
|----|----|
| Assembly | TSQLSmellSCA |
| Namespace | TSQLSmellSCA |
| Class | TSQLSmellSCA33 |
## Rule Information
| | |
|----|----|
| Id | SML033 |
| Friendly Name | Single character variable names are poor practice |
| Category | CodeSmells |
| Ignorable | false |
| Applicable Types | Model |
## Description
Single character variable names are poor practice
### Examples
```sql
Create PRocedure dbo.SelectAs
as
Set nocount on ;
Declare @X table
(
Id integer
)
Select * from @x
-- SML005, SML033
```
```sql
CREATE Function dbo.udfTestSelectStarMultiStatementTVF()
RETURNS @RetTable TABLE(
id INTEGER
)
as
BEGIN
SET NOCOUNT ON;
DECLARE @s INTEGER;
WITH cteTest
AS
(
SELECT * FROM dbo.TestTableSSDT
)
SELECT @s = cteTest.Col1
FROM cteTest
return
end
-- SML005, SML033
```
```sql
CREATE Function dbo.udfTestSelectStar()
RETURNS integer
as
BEGIN
DECLARE @s INTEGER;
WITH cteTest
AS
(
SELECT * FROM dbo.TestTableSSDT
)
SELECT @s = IdCol
FROM cteTest
RETURN @s
end
-- SML005, SML033
```
<sub><sup>Generated by a tool</sup></sub>