exam questions

Exam 1z0-082 All Questions

View all questions & answers for the 1z0-082 exam

Exam 1z0-082 topic 1 question 18 discussion

Actual exam question from Oracle's 1z0-082
Question #: 18
Topic #: 1
[All 1z0-082 Questions]

Evaluate these commands which execute successfully:

Which two statements are true about the ORD_ITEMS table and the ORD_SEQ sequence? (Choose two.)

  • A. If sequence ORD_SEQ is dropped then the default value for column ORD_NO will be NULL for rows inserted into ORD_ITEMS
  • B. Any user inserting rows into table ORD_ITEMS must have been granted access to sequence ORD_SEQ
  • C. Column ORD_NO gets the next number from sequence ORD_SEQ whenever a row is inserted into ORD_ITEMS and no explicit value is given for ORD_NO
  • D. Sequence ORD_SEQ cycles back to 1 after every 5000 numbers and can cycle 20 times
  • E. Sequence ORD_SEQ is guaranteed not to generate duplicate numbers
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ama
Highly Voted 3 years, 11 months ago
i double checked this Question again. i am sure B,C are correct
upvoted 25 times
Ekos
3 years, 7 months ago
yes, agree
upvoted 3 times
...
...
Sharif1
Highly Voted 3 years, 11 months ago
BC are correct.
upvoted 9 times
...
Abdullejr
Most Recent 6 months ago
Selected Answer: C
There is only one correct answer which is C. B is incorrect because you can insert into the table without using the default value of ord_no i.e. INSERT INTO ord_items (ord_no,item_no, qty, expiry_date) VALUES (3,25,11, sysdate +10) ;
upvoted 3 times
...
mamadu
1 year ago
Selected Answer: BC
B&C are true.
upvoted 1 times
...
auwia
1 year ago
Selected Answer: BC
A. If sequence ORD_SEQ is dropped then the default value for column ORD_NO will be NULL for rows inserted into ORD_ITEMS --> False, the column is NOT NULL. B. Any user inserting rows into table ORD_ITEMS must have been granted access to sequence ORD_SEQ --> True C. Column ORD_NO gets the next number from sequence ORD_SEQ whenever a row is inserted into ORD_ITEMS and no explicit value is given for ORD_NO --> True D. Sequence ORD_SEQ cycles back to 1 after every 5000 numbers and can cycle 20 times --> False, it goes back to 1 after 1.000.000... E. Sequence ORD_SEQ is guaranteed not to generate duplicate numbers --> False, having CYCLE in the create statement, duplicates will arrive after the first cycle.
upvoted 4 times
...
RaNik69
1 year, 1 month ago
Selected Answer: BC
B,C checked
upvoted 1 times
...
477267
1 year, 4 months ago
BE I tired to run the sequence again starting from one and giving max value 10 to check if duplicate value is inserted , But it complains as below insert into ord_items (ITEM_NO,QTY,EXPIRY_DATE,ORD_NO)values (1,12,'03-MAR-23',ord_seq.NEXTVAL) * ERROR at line 1: ORA-00001: unique constraint (SYS.IT_PK) violated So bC OF THE CONSTRAINY ,iT WILL NEVER BE DUPLICATED
upvoted 1 times
ronie_23
3 months, 1 week ago
You are getting Unique constraint because on ord_no has been specified as one of the primary key. But answer E was specific state about the sequence to guarantee no duplicate. Once CYCLE has been defined on the sequence means once reach the maximum Val it will start again at 1.
upvoted 1 times
...
...
Dbi
1 year, 5 months ago
For me B is false. You can insert into the table without having been granted access by not using the column's default value
upvoted 2 times
...
trgbighero
1 year, 9 months ago
Selected Answer: BC
BC is corrent
upvoted 1 times
...
algerianphoenix
2 years, 2 months ago
BC, Correct answers.
upvoted 2 times
...
BM2000
2 years, 2 months ago
Selected Answer: BE
B: GRANT SELECT ON my_user.my_seq TO another_user; —to give access to others For E create sequence and table with smaller values: CREATE sequence ord_seq INCREMENT BY 1 START WITH 1 MAXVALUE 1000 CYCLE CACHE 500; CREATE TABLE ord_items (ord_no number(1) DEFAULT ord_seq.NEXTVAL NOT NULL, item_no number(3), PRIMARY KEY (ord_no, item_no)); select * from ord_items; insert into ord_items values(default,1); — keep entering until it will not take any more, keep going after few errors After getting values from 1 to 9 it will give this error “value larger than specified precision allowed for this column” Sequence never get the chance to CYCLE so E is correct in this scenario only.
upvoted 1 times
...
ryuah
2 years, 6 months ago
B,C is correct
upvoted 1 times
...
Guhborges
2 years, 9 months ago
B, C for sure.
upvoted 1 times
...
gabriel3600
3 years, 1 month ago
B and C
upvoted 1 times
...
kawsar
3 years, 3 months ago
Is there any possibility D is right...Hence C and D are correct
upvoted 1 times
...
escoletsgo1
3 years, 10 months ago
BC 100%
upvoted 7 times
...
NowOrNever
3 years, 12 months ago
BC are correct ADE are wrong
upvoted 8 times
ama
3 years, 11 months ago
Wrong, A C are correct.. B is wrong, i tested it
upvoted 2 times
elbelgounetos
3 years, 4 months ago
A is wrong dropping the sequence lead to ORA-02289 : sequence does not exists
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago