2021
01-27
01-27
postgreSQL中的内连接和外连接实现操作
测试数据:city表:createtablecity(idint,nametext);insertintocityvalues(0,'北京'),(1,'西安'),(2,'天津'),(3,'上海'),(4,'哈尔滨'),(5,'西藏')person表:createtableperson(idint,lastnamechar(20));insertintopersonvalues(0,'Tom'),(2,'Lily'),(3,'Mary'),(5,'Coco');select*fromcity;select*fromperson;一:内连接:1.innerjoininnerjoin(等值连接)只返回两个表中联结字段相等的行sql语句:select*...
继续阅读 >