Search This Blog

MySQL: select records from multiple records

  • Full join(Cross Join):
    SELECT employee.id, employee.name, salary.amount FROM employee, salary WHERE employee.id=salary.employee_id;
    
  • Left/Right join:
    SELECT employee.id, employee.name, salary.amount LEFT JOIN ON employee.id=salary.employee_id;
    

SEE ALSO

No comments:

Post a Comment