尝试在mysql中创建视图时收到此消息。我也尝试给每一列提供一个别名,但仍然收到一个错误。怎么了!?提前谢谢。
错误消息
错误1060:列名“id”重复
代码
CREATE VIEW contactnotes AS
SELECT contact.ID, log.ID, contact.Name, log.notes
FROM log
JOIN contact
ON log.ID = contact.ID
别名尝试
CREATE VIEW contactnotes AS
SELECT contact.ID as id1, log.ID as id2, contact.Name, log.notes
FROM log
JOIN contact
ON id1 = id2
1条答案
按热度按时间fkaflof61#
或者