I have table

dept ( deptname primary key, col1, col2);
emp ( empname primary key, c1,c2);

i have two tables , because of our application's limitation.
they ask me to implement inside the database that
deptname never the same as empname.

although it sounds ridiculous, but it is the way it is,
so i need to do some trigger or whatever to ensure no
dept name and emp name are the same,

how to do that?

what i can thought is each time just before i try to insert something to dept table, i will check to see if the same value
already exist in emp table. visa versa.
if this thought is correct, can somebody write one for me,
because i don't know EXACTLY how to write it.