A table named "sample" is defined as below. Select two statements which will generate a constraint error. CREATE TABLE sample ( i INTEGER PRIMARY KEY, j INTEGER,
CHECK ( i > 0 AND j < 0 ) );
Suggested Answer: A, D
Get Premium PGCES-02 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
37 comments · newest first
WA
Walker
12 months ago
I thought NULL would break it, but I guess not!
BE
Bettina
1 year ago
B is good too, negative j is okay.
KR
Kristofer
1 year ago
Wait, C should be fine, right? NULL is allowed!
IS
Isaac
1 year ago
Totally agree, those values don't meet the CHECK.
CA
Cassi
1 year ago
A and D will cause errors.
JE
Jennifer
1 year ago
I believe E should be fine since j is negative, but I’m confused about how NULLs interact with the constraints.
TH
Thaddeus
1 year ago
I practiced a similar question where the CHECK constraint was tricky. I feel like A might also cause an error since j isn't negative.
AL
Albert
1 year ago
I'm not sure about C, but I remember something about NULLs not violating CHECK constraints.
DE
Detra
1 year ago
I think option D will definitely cause a constraint error because of the NULL value for the primary key.
KA
Karan
1 year ago
Ugh, I'm a bit lost here. I'll have to re-read the question a few times and maybe even sketch it out to make sure I understand.
MA
Mari
1 year ago
I'm feeling pretty confident about this. I just need to identify which insert statements will violate the constraint.
NO
Novella
1 year ago
Okay, I think I've got this. The key is the CHECK constraint, which requires i to be greater than 0 and j to be less than 0.
TH
Thurman
1 year ago
Hmm, this looks tricky. I'll need to carefully read the table definition and think through each of the insert statements.
NO
Noe
1 year ago
Wait, what about NULL values? I'm not sure how those will interact with the constraint.
CA
Carmen
1 year ago
The key here is to focus on the specific wording of the question. It's asking about Salesforce functionalities that are ignored, not the ones that are considered. I think the answer is multiple currencies, field-level security, and record type picklist value assignments.
ER
Ernestine
1 year ago
This looks straightforward, I'll just need to carefully analyze the burndown chart to determine the iteration's status.
DE
Delfina
1 year ago
Hmm, I'm a bit unsure about this one. I'll need to think it through carefully to make sure I understand the concepts before answering.
JA
Janey
2 years ago
This is a job for the SQL Ninja! *strikes a dramatic pose* Okay, let's see... The `i` column must be greater than 0, and the `j` column must be less than 0. That means (A) and (D) are the troublemakers here. Time to show off my database kung-fu skills! *cracks knuckles*
BL
Blondell
2 years ago
Alright, let's do this! Hmm, the `i` column has to be positive, and the `j` column has to be negative. So (A) and (C) are definitely going to fail. Wait, did they say two statements? Guess I better double-check my work. *scratches head* Where's my SQL cheat sheet when I need it?
NI
Nieves
1 year ago
User 3: And (C) violates the constraint on column j being negative.
LE
Leontine
1 year ago
User 2: Yeah, (A) violates the constraint on column i being positive.
CO
Cordelia
1 year ago
User 1: (A) and (C) are definitely going to fail.
YA
Yaeko
2 years ago
Ah, the joys of database design. Clearly, the table gods have blessed us with a challenge! I'm gonna go with (C) and (D) as the troublemakers here. Null values and CHECK constraints don't always play nicely, you know. But hey, at least it's not a production database, right? *laughs nervously*
KI
Kimbery
1 year ago
User 3: Always a fun challenge in database design!
AS
Ashton
2 years ago
User 2: Yeah, null values and constraints can be tricky.
GE
Gerardo
2 years ago
User 1: I think (C) and (D) are the culprits.
JO
Jose
2 years ago
Ooh, a tricky one! Okay, let's think this through. The table definition says the `i` column must be greater than 0 and the `j` column must be less than 0. So (B) and (E) should be good, but (A), (C), and (D) are gonna trigger that constraint error for sure. Time to put on my SQL thinking cap!
EU
Eulah
1 year ago
User1: Right, both (A) and (C) are no-gos for this table.
CH
Chun
1 year ago
User3: (C) will also trigger the constraint error because of the NULL value.
MA
Mari
1 year ago
User2: Yeah, because the value of j is not less than 0.
CH
Cheryll
2 years ago
User1: I think (A) will cause a constraint error.
GR
Gregoria
2 years ago
User2: Yeah, because the value of j is not less than 0.
RO
Rozella
2 years ago
User1: I think (A) will cause a constraint error.
BE
Berry
2 years ago
Well, look at that, an opportunity to show off my SQL prowess! Let's see, the question is which statements will generate a constraint error. Hmmm, I'm thinking (A) and (C) are the ones that will fail. Gotta love those pesky CHECK constraints!
DO
Dortha
2 years ago
I believe statement D will also generate a constraint error because it has a NULL value for i.
DA
Dannette
2 years ago
I agree with Rosina. The constraint CHECK ( i > 0 AND j < 0 ) will be violated with statement B.
RO
Rosina
2 years ago
I think statement B will generate a constraint error.