First off, I have no idea if this is possible, was just brainstorming.
I have a system that tracks 'live jobs' for a company's clients. They all get a unique 'job_id' in the database (Auto Incrementing).
Now these jobs have about 20+ tables linked to them (or will) and I have been naming columns in a certain pattern, to keep them easy to read.
All materials have a column called 'material_job_id', data files have a column called 'data_job_id' and so on for the various tables
What I was wondering is this:
Is it possible to delete ALL rows where the column ending in 'job_id' has the value X(Variable)
If nobody knows a relatively clean workaround, I'll just have to go into each table individually.
I also want to note, my knowledge of SQL is a bit limited, so if you know a way in SQL, I'd appreciate it if you explained what it was doing along the way
Any input is appreciated!