Skip to content

Uncommon SQL

19. July 2010
By plogi in general

Hi!
There are some useful SQL structures, which are not so commonly used. For example I like the following syntax:

select * from vending_price where (product_id,valid_from) = (0,'2010-01-09');


It is basically the same than the following, but more compact and easier to read.

select * from vending_price where product_id = 0 and valid_from  =  '2010-01-09';

Comment Feed

No Responses (yet)

You must be logged in to post a comment.