기록해! 정리해!

Select 연산자 연습 본문

연습문제/Oracle(SQLD)

Select 연산자 연습

zsuling 2022. 5. 18. 10:28

drop table T0517;

 

Create table T0517(
 sno char(3),
 sname nvarchar2(5),
 age number(3)
 );
 
insert into t0517(sno,sname,age)values('B03','효리',24);

update t0517 set sname='솔라', age='21' where sno='B01';

update t0517 set age='23' where sname='효리';

update t0517 set age=age-2;

update t0517 set age='23' where sname='효리' or sname='솔라'; 

update t0517 set age='24' where sno in ('B01','B03');

update t0517 set age='23' where sname='효리' or sno='B04'; 

insert into t0517(sno, sname, age) values ( 'A01', '하나', '17');

insert into t0517(sno, sname, age) values ( 'A02', '두리', '15');

insert into t0517(sno, sname, age) values ( 'A03', '마리', '13');

select sno, sname, age from T0517;



-- 나이가 23살인 사람을 출력하시오.

-- 나이가 23살이 아닌 사람을 출력하시오.

-- 나이가 23살 이상인 사람을 출력하시오.

-- 나이가 15살 미만인 사람을 출력하시오.

-- 나이가 15살 이상 , 23살 미만인 사람을 출력하시오.

 

 

'연습문제 > Oracle(SQLD)' 카테고리의 다른 글

Select 연습(5)- 학생테이블  (0) 2022.05.23
Select 연습(4)-서브쿼리  (0) 2022.05.23
Select 연습(3)  (0) 2022.05.19
Select 연습 (2)  (0) 2022.05.19
select 연습  (0) 2022.05.18
Comments