3 ms·
I have also seen this before. The knee-jerk reaction of programmers who are subjected to the imperfection of SQL is to introduce more abstractions. But it is p
by fifilura 4y ago
I have also seen this before. The knee-jerk reaction of programmers who are subjected to the imperfection of SQL is to introduce more abstractions.
But it is perfectly possible to write correct SQL code. Just like it is possible to solve mathematical equations with pen and paper.
I try to accept SQL as it is and avoid any abstractions because they make the query impossible to read.
I write my queries top down using CTEs and test manually along the way.
And it turns out that 90% of the problems are not in the query logic but with the input data and the two villains of tabular data.
Duplicate rows and NULL values.
- habibur 4y agoAbstract INSERT, UPDATE, DELETE and select by id, as these are common idiomatic tasks. And then write sql statements for everything else.