Which of the following correctly creates a SQL statement that will insert the values of the $name and $age variables into a database?

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.

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.

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)};



Leave a Reply 0

Your email address will not be published. Required fields are marked *