2021
01-08
01-08
PostgresSql 多表关联删除语句的操作
最近用PostgresSql数据库进行多表关联删除的操作,在写sql语句的时候遇到了问题:DELETEs.*FROMstudents,classroomcWHEREs.cid=c.idANDs.sid=1DELETEFROMstudents,classroomcWHEREs.cid=c.idANDs.sid=1上面两种写法操作后提示报错,下面是PostgresSql数据库对多表关联操作的正确用法,多张表之间用USING连接:DELETEFROMstudentsUSINGclassroomcWHEREs.cid=c.idANDs.sid=1补充:PostgresSQ...
继续阅读 >