I have this so far but the Column ‘name’ is ambiguous, so I want to change the name column in the modle table to something else (There is also a name column is the student table). How can I do this?
SELECT name
FROM student
JOIN modle ON modle.id = event.modle
JOIN event ON event.id = attends.event
JOIN attends ON attends.student = student.id
WHERE name LIKE '%Database%'
Column aliases allow you to create your own column names for a particular resultset.
Example:
If you want to permanently change a column name use the
ALTER TABLEcommand:http://dev.mysql.com/doc/refman/5.1/en/alter-table.html
Example:
http://dev.mysql.com/doc/refman/5.1/en/alter-table.html