I now have a railway route table Trains site Beijing 125 Baoding 125 Anyang 125 This table records trains and site, I hope to have after Beijing and baoding train number, this statement should be how to write? Also, the route table, so design, reasonable? If it is not reasonable, how to design?
CodePudding user response:
='Beijing' Select * from T1 where site and site='baoding' Group by trains
CodePudding user response:
The Select a. trains from T1 A Inner (Select * from T1 where site='Beijing') on a. B trains=b. trains Where a. site='baoding Group by a. trains
CodePudding user response:
SELECT the cc The FROM tb1 The WHERE (lh-zd='Beijing') OR Baoding (lh-zd=' ') GROUP BY cc
CodePudding user response:
Since is successively passed, then you should consider to have a direction, can consider to each site has a serial number on the mainland, trains for later maintenance and management,