oracle 필기시험 문제
4684 단어 면접시험
1) A 100 .
Select * FROM A Where A.COLUMN1 = A.COLUMN1
? ( , 1 :)
(2) Create SEQUENCE PEAK_NO
Select PEAK_NO.NEXTVAL FROM DUAL --> 1
10 ,
Select PEAK_NO.NEXTVAL FROM DUAL --> ?
(3) SQL> connect sys as sysdba
Connected.
SQL> insert into dual values ( 'Y');
1 row created.
SQL> commit;
Commit complete.
SQL> select count(*) from dual;
COUNT(*)
----------
2
SQL> delete from dual;
commit;
-->DUAL ?
JUST TRY IT
SQL
null null,
, ( :not in/not exists+null)
SQL> select * from usertable;
USERID USERNAME
----------- ----------------
1 user1
2 null
3 user3
4 null
5 user5
6 user6
SQL> select * from usergrade;
USERID USERNAME GRADE
---------- ---------------- ----------
1 user1 90
2 null 80
7 user7 80
8 user8 90
:
select count(*) from usergrade where username not in (select username from usertable);
select count(*) from usergrade g where not exists
(select null from usertable t where t.userid=g.userid and t.username=g.username);
: 1( 0 ) 2 ( 3 )
A: 0 B:1 C:2 D:3 E:NULL
2
, ( :in/exists+rownum)
SQL> select * from usertable;
USERID USERNAME
----------- ----------------
1 user1
2 user2
3 user3
4 user4
5 user5
SQL> select * from usergrade;
USERNAME GRADE
---------------- ----------
user9 90
user8 80
user7 80
user2 90
user1 100
user1 80
Select count(*) from usertable t1 where username in
(select username from usergrade t2 where rownum <=1);
Select count(*) from usertable t1 where exists
(select 'x' from usergrade t2 where t1.username=t2.username and rownum <=1);
:( ) ( )
A: 0 B: 1 C: 2 D: 3
, , T1 ;
select * from emp;
EMPNO DEPTNO SALARY
----- ------ ------
100 1 55
101 1 50
select * from dept;
DEPTNO SUM_OF_SALARY
------ -------------
1 105
2
, 2 , null, ,
( ) ( ) , :
time session 1 session2
----------- ------------------------------- -----------------------------------
T1 insert into emp
values(102,2,60)
T2 update emp set deptno =2
where empno=100
T3 update dept set sum_of_salary =
(select sum(salary) from emp
where emp.deptno=dept.deptno)
where dept.deptno in(1,2);
T4 update dept set sum_of_salary =
(select sum(salary) from emp
where emp.deptno=dept.deptno)
where dept.deptno in(1,2);
T5 commit;
T6 select sum(salary) from emp group by deptno;
: 2 :
T7 commit;
======= , , ========
T8 select sum(salary) from emp group by deptno;
:
T9 select * from dept;
:
( ) ( ) ( )
A: B:
---------------- ----------------
1 50 1 50
2 60 2 55
C: D:
---------------- ----------------
1 50 1 115
2 115 2 50
E: F:
---------------- ----------------
1 105 1 110
2 60 2 55
, ( : )
select id,grade from student_grade
ID GRADE
-------- -----------
1 50
2 40
3 70
4 80
5 30
6 90
select id,grade from student_makeup
ID GRADE
-------- -----------
1 60
2 80
5 60
dba , :
update student_grade s set s.grade =
(select t.grade from student_makeup t
where s.id=t.id);
commit;
:
select GRADE from student_grade where id = 3; :
A: 0 B: 70 C: null D:
, ,
T1
session1 session2
-------------------------------------- ----------------------------------------
T1 select count(*) from t;
-- (1000)
T2 delete from t where rownum <=100;
T3 begin
delete from t where rownum <=100;
commit;
end;
/
T4 truncate table t;
T5 select count(*) from t;
--
A: 1000 B: 900 C: 800 D: 0
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
면접 에서 자바 SE 와 관련 된 몇 가지 큰 문제인터페이스 라 는 것 은 바로 시스템 류 (구조) 디자인 에 대한 고려 를 바탕 으로 하 는 것 이다.시스템 은 보통 여러 모듈 을 설계 해 야 한다. 여러 모듈 간 의 결합 관 계 는 보통 인터페이스 로 연결 되 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.