Spraban9 Posted March 28, 2013 Share Posted March 28, 2013 create view alltable as SELECT cr.city,cr.address,cr.description,cr.contact,cr.postdate,cs.city,cs.address,cs.description,cs.contact,cs.postdate,la.city,la.address,la.description,la.contact,la.postdate,ho.city,ho.address,ho.description,ho.contact,ho.postdate from computerrepair as cr,computersale as cs, land as la,house as ho where cr.postdate =cs.postdate and cs.postdate=la.postdate and la.postdate=ho.postdate and cr.postdate='2013-03-26' hi friends i create view for get data in order to postdate but this coding show below error. #1060 - Duplicate column name 'city' how to solve this problem friends Quote Link to comment https://forums.phpfreaks.com/topic/276267-1060-duplicate-column-name-city-error-in-creting-view-for-phpmyadmin/ Share on other sites More sharing options...
mikosiko Posted March 28, 2013 Share Posted March 28, 2013 use aliases to differentiate columns with the same name in each table... like : cs.city AS cscity or whatever alias that you like the most.... Quote Link to comment https://forums.phpfreaks.com/topic/276267-1060-duplicate-column-name-city-error-in-creting-view-for-phpmyadmin/#findComment-1421623 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.