Query


Starting with  a,c,g from name or other field
______________________________________________________

SELECT * FROM `articles` WHERE `field` REGEXP '[[:<:]][acgj]'


Get data from Last 2 date
__________________

SELECT  * FROM    `tablename` WHERE   paymentdate BETWEEN SYSDATE() - INTERVAL 2 DAY AND SYSDATE()

find duplicate raw
__________________

SELECT *, count(qty) as n FROM tablename group by userid HAVING n>1;

 

No comments:

Post a Comment