SQL statements were executed in the following order:
CREATE TABLE fmaster
(id INTEGER PRIMARY KEY, name TEXT);
CREATE TABLE ftrans
(id INTEGER REFERENCES fmaster (id), stat INTEGER, date DATE);
INSERT INTO fmaster VALUES (1, 'itemA');
INSERT INTO ftrans VALUES (1, 1, CURRENT_DATE);
Select two SQL statements that will generate an error when executed next.
Suggested Answer: A, C
Get Premium PGCES-02 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
12 comments · newest first
MI
Mindy
11 months ago
Wait, can you really update the id in ftrans? That seems risky.
DU
Dulce
11 months ago
D is a big no-no! Can't change primary key values like that.
MA
Maile
12 months ago
No way, C is fine! It updates a name, not an id.
FE
Felicia
12 months ago
I think B might also throw an error since id 2 doesn't exist.
NA
Naomi
12 months ago
A and D will definitely cause errors.
LA
Lavonna
1 year ago
I’m a bit confused about option A. Didn’t we already insert that same value? Would it cause a duplicate key error?
QU
Queen
1 year ago
I remember a practice question where we had to check foreign key constraints. I think option E will throw an error because 200 isn't a valid reference in fmaster.
LE
Lemuel
1 year ago
I'm not entirely sure, but I feel like option D could also cause an issue since changing the primary key might break something.
GL
Glory
1 year ago
I think option B might generate an error because the ID 2 doesn't exist in fmaster, right?
EL
Eliseo
1 year ago
This question seems straightforward, I think I know the answer based on my understanding of SIP URI dialing.
ME
Meaghan
1 year ago
I'm a bit confused on this question. I know InnoDB encryption is supposed to be transparent, but I'm not sure if that means it supports all indexes transparently. I'll have to think about that one.
KE
Kenda
1 year ago
The discount rate seems like it could be an issue, but I'm not entirely sure. I'll need to review the rationale for using 10% and see if that's the right approach.