신입사원 입문교육_정리

ddl workshop

FireStone 2021. 1. 27. 16:15
--ddl
--34
update tb_department
set capacity = round(capacity*1.1,0);

select * from tb_department;

-- 35
update tb_student
set student_address = '서울시 종로구 숭인동 181-21'
where student_no = 'A413042';

select * from tb_student WHERE student_no = 'A413042';

--36
update tb_student
set student_ssn = substr(student_ssn,0,6);
select * from tb_student;

--37
update tb_grade
set point = '3.5'
where term_no = '200501' AND 
class_no = (select class_no from tb_class where class_name = '피부생리학')
and student_no = (select student_no from tb_student 
join tb_department using(department_no)
where student_name ='김명훈' and department_name = '의학과');

--38
delete from tb_grade
where student_no in (select student_no 
from tb_student where absence_yn ='Y');

rollback;

'신입사원 입문교육_정리' 카테고리의 다른 글

workshop 3  (0) 2021.01.27
oracle db - 나머지공부 - 정리  (0) 2021.01.27
SQL - Day2  (0) 2021.01.27
sql workshop - day1  (0) 2021.01.26
SQL - 1일차  (0) 2021.01.26