Guest User

SubSelect

a guest
Jul 23rd, 2012
526
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.26 KB | None | 0 0
  1. SELECT
  2.     C.atributo,
  3.     (
  4.         SELECT
  5.             B.atributo_boleto
  6.         FROM
  7.             boleto B
  8.         WHERE
  9.             C.id_cliente = B.id_cliente
  10.         ORDER BY id_boleto DESC
  11.         LIMIT 0,1
  12.  
  13.     ) AS atributo_boleto
  14. FROM
  15.     cliente C
Advertisement
Add Comment
Please, Sign In to add comment