Mysql
 sql >> Datenbank >  >> RDS >> Mysql

mySQL tritt zweimal derselben Tabelle bei

Sie können so machen:

select 
 audit_log_entries.created_at,
 audit1.name as originator,
 audit2.name as terminator
from audit_log_entries 
 join audit_log_orig_term_types audit1 on audit_log_entries.originator_type_id = audit1.id
 join audit_log_orig_term_types audit2 on audit_log_entries.terminator_type_id = audit2.id;