Created
October 2, 2013 13:52
-
-
Save jgdoncel/6794152 to your computer and use it in GitHub Desktop.
IF en subconsulta
Ejemplo de uso de una condición IF con una subconsulta en su interior
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT files.contentType, IF ((SELECT COUNT(id) FROM files_favoritos)=0,'si','no') FROM files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SELECT DISTINCT files.contentType, IF ((SELECT COUNT(id) FROM files_favoritos)=0,'si','no') FROM files