Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个这样的数据库:-
state_name|district_name|id jammu |kupwara |jk-01 kashmir |anantnag |jk-02
我想要一个 mysql 查询,这样当
statename is selected (jammu), distname should be selected(kupwara) based on thier id.
statename is selected (jammu), distname should be selected(kupwara) based on thier id
如果有人知道,请帮助我。在此先感谢
如果我正确理解了您的问题,那么查询应该是这样的
SELECT state_name,district_name from TableName WHERE id='jk-01' //you can have your specific id here