I have two tables
SEQID | MASTERID | BUSINESS_UNIT | DIVISION | SUB_DIVISION | CLASSIFICATION | SUB_CLASSIFICATION
MASTERID | EMPNO | LASTNAME | FIRSTNAME | JOBTITLE | LOCATION |
DELETE em.JOBTITLE, eg.BUSINESS_UNIT, eg.DIVISION, eg.SUB_DIVISION, eg.CLASIFFICATION, eg.SUB_CLASSIFICATION
FROM EMP_MASTERTBL AS em, EMPGROUP_TBL AS eg
WHERE em.MASTERID = eg.MASTERID AND eg.MASTERID = '76196'
Incorrect syntax near ','.
DELETE JOBTITLE FROM EMP_MASTERTBL WHERE MASTERID = '76196';
DELETE FROM EMPGROUP_TBL WHERE MASTERID = '76196'
Invalid object name 'JOBTITLE'.
When you DELETE FROM a table you are not deleting from a particular field, are you are deleting the entire row. That is why when you write the delete statement you don't include field names.
It is also possible to set up a foreign key relationship between your two tables so that when you delete from EMP_MASTERTBL it also deletes the child records in EMPGROUP_TB. http://www.mysqltutorial.org/mysql-on-delete-cascade/
On closer reading of your updated question, I think what you would really like to do is this:
UPDATE EMP_MASTERTBL SET JOBTITLE = NULL WHERE MASTERID = '76196'; DELETE FROM EMPGROUP_TB WHERE MASTERID = '76196';
That is, you're setting the
JOBTITLE to NULL, and deleting all related records in