Home > Database > Mysql Tutorial > mysql 做的demo_MySQL

mysql 做的demo_MySQL

WBOY
Release: 2016-06-01 13:48:38
Original
989 people have browsed it

bitsCN.com

mysql 做的demo 

注意事项: mysql union 和 group 碰头 报错  双方要有括号  

               not in 和 limit 也要分开

 

(SELECT app_type_id,
app_type_name
FROM `app_dw`.`APP_TYPE` #table_name
order by app_type_id
limit 5)
union all
(select sum(app_type_id) app_type_id,'the_six'
from `app_dw`.`APP_TYPE`
where app_type_key not in ( select * from
(SELECT app_type_key FROM `app_dw`.`APP_TYPE`
order by app_type_id limit 5)as t)
)

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template