Consider these several tables:
tab1
-------
userid
email
address
environment
tab2
-------
ecode
company
policy
tab3
-------
id
pan no.
dl no.
Here tab1 is the parent table. I want to delete all the userid of tab1 from tab2 and tab3. Either userid will be in tab1 or tab2 or both. These tables are environment specific means environment/tab1 and environment/tab2.
How can this be done with a single query?