DROP FUNCTION IF EXISTS `value_of_bit_index`$$ /*计算数字的某个位的值*/ CREATE FUNCTION `value_of_bit_index`(`number` int, `idx` int) RETURNS int(11) BEGIN RETURN (`number` >> (`idx`-1)) ^ ((`number` >> `idx`-1) &~1); END$$
DELIMITER ;
posted on
2018-09-13 17:52袁晓平
阅读(279)
评论(0)
编辑收藏举报