草庐IT

TreePaths

全部标签

mysql - Fun with MySQL - 如何使用 IN 编写删除语句

当我尝试DELETEFROM`TreePaths`WHERE`descendant`IN(SELECT`descendant`FROM`TreePaths`WHERE`ancestor`=0x04);我明白了#1093-Youcan'tspecifytargettable'TreePaths'forupdateinFROMclause我怎样才能让删除生效?更新:表结构:CREATETABLETreePaths(ancestorVARBINARY(16)NOTNULL,descendantVARBINARY(16)NOTNULL,PRIMARYKEY(`ancestor`,`descen