1.找出所有首都和其國家名字,而首都要有國家名字中出現。
select capital,name from world
where capital like concat('%',name,'%')
2.找出所有首都和其國家名字,而首都是國家名字的延伸。
select name,capital from world
where capital like concat(name,'_%')
1.找出所有首都和其國家名字,而首都要有國家名字中出現。
select capital,name from world
where capital like concat('%',name,'%')
2.找出所有首都和其國家名字,而首都是國家名字的延伸。
select name,capital from world
where capital like concat(name,'_%')