How to check SQL queries and ensure their quality?

These days I am working on some business intelligence reports. Data is retrieved by regular SQL SELECT statements. Statements are becoming more complex.

The data I want to report is partially critical for business. Therefore, I would be better off if I could do something to prove the correctness and quality of the SQL statements.

I know that there are several ways to do this for application code. But what can I do to achieve these goals at the SQL level?

Thanks in advance.

+3
source share
5 answers

- QA SQL, , () , .

, SQL , expecetd ( , CSV ..).

unit test .

CSV , -, SQL (, , ).

+7

, , SQL , , , .

- .

+1

, . SQL. , , , .

+1

. , , , . , 14 .

, . , , , , . , , , - , , , .

, , . , , , . ( ). , , . , , 12 , , ? , 14, , , ( , ). 10, , ( , , ) -, .

, , , , -, , .

, . , , .

, , , , . , - , , -.

, , . qa , . , , XYZ, . , .

, , - , . , , , , prod . . , . , prod, , .

+1

SQL. - , . , . SQL , , SQL.

SQL , , SQL, , .

unit test , .

0

Source: https://habr.com/ru/post/1731216/


All Articles