DROP TABLE IF EXISTS `rr_notification_info`; CREATE TABLE `rr_notification_info` ( `id` bigint(20) NOT NULL, `member_id` int(10) DEFAULT NULL, `message` varchar(300) DEFAULT NULL, `send_date` datetime DEFAULT NULL, `type` int(3) DEFAULT NULL, `opent_status` int(2) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
要的结果:
解决方案
20
select type,message,send_date from rr_notification_info group by type;
60
LZ你好
本人不知道你这个是什么页面,其实程序里面可以用变量和控件来获取值,不需要完全用SQL语句,原因是SQL语句太多,执行效率太低,以下仅供参考
SELECT CONCAT(region_name,store_name) FROM Geography
订单消息
select send_date,concat(select member_name from member where member_id=member.member_id,”下单”),concat(“订单号”,id) from rr_notification_info
活动消息
select message from rr_notification_info
系统消息
select convert(varchar(100), getdate(), 5),message from rr_notification_info
本人不知道你这个是什么页面,其实程序里面可以用变量和控件来获取值,不需要完全用SQL语句,原因是SQL语句太多,执行效率太低,以下仅供参考
SELECT CONCAT(region_name,store_name) FROM Geography
订单消息
select send_date,concat(select member_name from member where member_id=member.member_id,”下单”),concat(“订单号”,id) from rr_notification_info
活动消息
select message from rr_notification_info
系统消息
select convert(varchar(100), getdate(), 5),message from rr_notification_info