DEV Community

Discussion on: Defensive SQL Query Writing

Collapse
 
buinauskas profile image
Evaldas Buinauskas

The second query might prevent query from failing, but subquery returning more than a single row might be a bug in the data model and using LIMIT could be hiding that.

Collapse
 
kovidr profile image
Kovid Rathee

@Evaldas - You're right. I mentioned that. That's why it must be used carefully!