游客发表

MySQL表别名的另类用法

发帖时间:2025-11-05 04:58:28

MySQL表别名的另类用法
复制lock tables `categories` write,表别名 `categories` as `c1` write,   `categories` as `c2` write;    update `categories` as `c1`, `categories` as `c2` set `c1`.`parent_id` = `c2`.`parent_id` where `c1`.`parent_id` = `c2`.`cat_id` and `c2`.`cat_id` = $cat_id;    delete from `categories` where `cat_id` = $cat_id;    unlock tables;   1.2.3.4.5.6.7.8.

    热门排行

    友情链接