SQL Select, different than the last 10 records -


i have table called "dutyroster". want make random selection table's "names" column, but, want selection different last 10 records same guy not given second duty in 10 days. possible ?

create temporary table 1 column called oldnames have no records initially. each select, execute query

select names dutyroster dutyroster.names not in (select oldnamesfrom temporarytable) limit 10

and when execution done add resultset temporary table


Comments

Popular posts from this blog

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -