ALTER TABLE "ANDY"."T_SP"
ADD (
CONSTRAINT "T_SP_CK41280286429390" CHECK
(select depart from t_staff,t_sp where id=s_id=t_dp.d_id and t_sp.p_id=t_dp.p_id)
) ;
ADD (
CONSTRAINT "T_SP_CK41280286429390" CHECK
(select depart from t_staff,t_sp where id=s_id=t_dp.d_id and t_sp.p_id=t_dp.p_id)
) ;
http://blog.csdn.net/xys_777/archive/2010/06/27/5697095.aspx