我有这张小桌子是我从两张桌子中提取的 使用此代码:
select doctor_id, spec_code from doctor_speciality where doctor_id in
(select doctor_id from doctor where doctor_fname='Decca' and doctor_lname=INITCAP('BLANKHORN'))
我试图仅使用值spec_code ='THORAC'来更新第三个表中的值。我该如何实现?
这是我尝试的代码,但无法正常工作。
我的代码:
Update speciality
set spec_description='Vascular surgery'
where spec_code='THORAC' in(
(select doctor_id, spec_code from doctor_speciality where doctor_id in
(select doctor_id from doctor where doctor_fname='Decca' and doctor_lname=INITCAP('BLANKHORN'))));
谢谢