MySql - Trouble Creating View

后端 未结 1 574
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-23 16:54

Receiving this message when trying to create a view in MySql. I\'ve tried giving an alias to each column as well and still receive an error. Wha Happon!? Thanks in advance.

相关标签:
1条回答
  • 2021-01-23 17:11
    CREATE VIEW contactnotes AS
    SELECT contact.ID as id1, log.ID as id2, contact.Name, log.notes
    FROM log 
    JOIN contact 
    ON log.ID = contact.ID
    

    or

    CREATE VIEW contactnotes AS
    SELECT contact.ID as id1, log.ID as id2, contact.Name, log.notes
    FROM log 
    INNER JOIN contact USING (ID)
    
    0 讨论(0)
提交回复
热议问题