6 ms·
Pascal's book [1] highlights various issues with the language & is worth reading if you are not familiar with it. Example: select * from customers c inner joi
by andy-p 6y ago
Pascal's book [1] highlights various issues with the language & is worth reading if you are not familiar with it.
Example:
select *
from customers c
inner join orders o on o.order_id = c.customer_id
Legal syntax but clearly incorrect.
[1] https://books.google.co.uk/books?id=t9ZQAAAAMAAJ&source=gbs_navlinks_s https://books.google.co.uk/books?id=t9ZQAAAAMAAJ&source=gbs_...
- blendo 6y agoDo you mean “incorrect” in the sense that comparing a customer_id to an order_id is semantic nonsense? I agree, and I do wish SQL had stronger typing so the parser could warn you before your query silently runs off the rails. For example, in Oracle, I believe the following is legal, but I wish it wasn’t: select * from my tab where 1 = ‘1’