Advertisement
angryatti

Our company employeer's who are they working over 40 years

Oct 6th, 2022 (edited)
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.36 KB | None | 0 0
  1. DROP PROCEDURE IF EXISTS  `negyveneve`;
  2.  
  3. DELIMITER //
  4. CREATE PROCEDURE negyveneve ()
  5. READS SQL DATA
  6. BEGIN
  7.     SELECT CONCAT(`FIRST_NAME`,' ', `LAST_NAME`) AS 'FULLNAME' FROM `employees` WHERE FLOOR(DATEDIFF(CURRENT_DATE,`HIRE_DATE`)/365.25) < FLOOR(DATEDIFF(CURRENT_DATE,DATE_ADD(CURRENT_DATE,INTERVAL -40 YEAR))/365.25);
  8. END//
  9.  
  10. DELIMITER ;
  11. CALL negyveneve();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement