CIW
1D0-437 · Question #78
Which of the following correctly creates a SQL statement that will insert the values of the $name and $age variables into a database? The statement is assigned to the $sqlStmt variable. Assume a…
The correct answer is C. $sqlStmt = qq{INSERT INTO aTable (NAME, AGE) VALUES ($name, $age)}. See the full explanation below for the reasoning.
Question
Which of the following correctly creates a SQL statement that will insert the values of the $name and $age variables into a database? The statement is assigned to the $sqlStmt variable. Assume a CHAR data type for $name and an INT data type for $age.
Options
- A$sqlStmt = q{INSERT INTO aTable (NAME, AGE) VALUES ($name, $age)};
- B$sqlStmt = q{INSERT INTO aTable (NAME, AGE) VALUES ($name, $age)};
- C$sqlStmt = qq{INSERT INTO aTable (NAME, AGE) VALUES ($name, $age)};
- D$sqlStmt = qq{INSERT INTO aTable (NAME, AGE) VALUES ($name, $age)};
How the community answered
(44 responses)- A7% (3)
- B5% (2)
- C73% (32)
- D16% (7)
Community Discussion
No community discussion yet for this question.