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

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -

Qt4: how to send QString inside a struct via QSharedMemory -