sql常忘记的操作

1.先分组 group by-----然后在分组里面继续选择-----having

select product_type,count(*) from prodect  group by product_type  having count(*)=2   

2.order by 排序1,排序2


3.insert  into 表名  (列名1,2,3)   values (值1,2,3)


复制表----insert into select  from



update 表名 

set () 

where 



猜你喜欢

转载自blog.csdn.net/qq_40053669/article/details/80546842