形如: '丹药|练功流|轻松|学生|学院风' 查询结果:'10|35|36|40'
SELECT GROUP_CONCAT(TAG_ID SEPARATOR '|') TAGS from BOOK_TAG WHERE instr('丹药|练功流|轻松|学生|学院流',TAG_NAME)
UPDATE BOOK_TYPE SET SUMMARY = (SELECT * FROM (SELECT SUMMARY FROM BOOK_TYPE WHERE TYPE_ID =19) T) where PARENT_TYPE_ID=19;
CREATE TRIGGER t_addsort_rank_b BEFORE INSERT ON RANK FOR EACH ROW
BEGIN
IF NEW.SORT IS NULL
THEN
SET NEW.SORT = 1 + (
SELECT
*
FROM
(
SELECT
IFNULL(MAX(SORT), 1)
FROM
RANK
WHERE
RANK_TYPE_ID = NEW.RANK_TYPE_ID
) T
);
END IF;
END;
缓存大小
set @@global.query_cache_size=1048576;
未完待补充