randoz

p2

May 12th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.28 KB | None | 0 0
  1. DROP VIEW en_alquiler;
  2. CREATE VIEW en_alquiler
  3.    AS
  4.    SELECT cu.uuid, c.label,cu.state
  5.    FROM cloth c, clothunit cu, rent r, rent_cloth rc
  6.    WHERE c.id=cu.cloth_id AND
  7.          r.id=rc.rent_id AND
  8.          rc.clothunit_id=cu.id AND
  9.          cu.state='ARRENDED';
  10. GO
  11.  
  12. SELECT * FROM en_alquiler;
Advertisement
Add Comment
Please, Sign In to add comment