Skip to content

SQL语句中存在注释, 解析存在问题 #116

@xiyangxixian

Description

@xiyangxixian

原SQL语句:

select
*
-- comment
from tb
where col = 1;

结果:

Query: 1E82204137DA4CA4

★ ★ ★ ★ ☆ 95分

SELECT  
  *

不建议使用SELECT * 类型查询

  • Item: COL.001

  • Severity: L1

  • Content: 当表结构变更时,使用*通配符选择所有列将导致查询的含义和行为会发生更改,可能导致查询返回更多的数据。

Query: 12FBD9CEB5E1C0D9

★ ★ ★ ★ ★ 100分

FROM  
  tb
 
WHERE  
  col  = 1

OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions