Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam C2090-616 All Questions

View all questions & answers for the C2090-616 exam

Exam C2090-616 topic 1 question 58 discussion

Actual exam question from IBM's C2090-616
Question #: 58
Topic #: 1
[All C2090-616 Questions]

The DDL statement is used to create table T1:
CREATE TABLEt1 (
c1 INTEGER,
c2 INTEGER NOT NULL,
c1 DECIMAL(11,2),
c4 TIMESTAMP WITH DEFAULT CURRENT TIMESTAMP
)
Which of the following INSERT statements will execute successfully?

  • A. INSERT INTO t1 VALUES (100)
  • B. INSERT INTO t1 (c1, c2) VALUES (100)
  • C. INSERT INTO t1 (c1, c3) VALUES ("˜100', "˜100.00')
  • D. INSERT INTO t1 (c2, c3) VALUES (100, 100.00), (101, 101)
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
JamesBond
3 years, 4 months ago
D is correct [db2inst2@vbox1 ~]$ db2 "INSERT INTO t1 (c2, c3) VALUES (100, 100.00), (101, 101)" DB20000I The SQL command completed successfully. [db2inst2@vbox1 ~]$
upvoted 1 times
...
mperedithe18
4 years, 1 month ago
D is the correct answer. Option B is not correct. It will fail because the number of values do not match the number of columns called out in the statement.
upvoted 2 times
...
Kalliopi
4 years, 2 months ago
D is the good one
upvoted 2 times
...
deepdg23
4 years, 4 months ago
D is the best option
upvoted 2 times
...
db2tester
5 years, 1 month ago
The good answer is "D- INSERT INTO t1 (c2, c3) VALUES (100, 100.00), (101, 101) " C2 column has the constraint not null. The answer ""INSERT INTO t1(c1,c2) VALUES(100)" is not good because you have to insert two values. You will get the error SQL0117N The number of values assigned is not the same as the number of specified or implied columns or variables. SQLSTATE=42802
upvoted 3 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 ...