在写sql语句的时候怎么写比如student和teacher两张表
你是想用sql直接写吗?设置外键的时候可以设置它的级别进行级联删除控制delete decade如果中项目中,建议还是在service层用事务控制进行处理,先删除student中数据,再删除teacher中数据。