C# Questions 27. Suppos 21. Suppose we have this sol statement: \"Select ABC, DE
ID: 3701412 • Letter: C
Question
C# Questions
27. Suppos 21. Suppose we have this sol statement: "Select ABC, DEF trom GH where JKL "MNO.", and it can be executed succesfully which statement (A -c) io not true about chis table? A. We have a table named GHI. B. It has at least 3 columns C. The column named JKL contains character data. D. All of A C are true 28. Which of these is the worst operation to attempt in an soL statement? A. Delete the primary key column from a table. B. Remove a non-key column from a table. C. Create a new table. D. Insert a row. 29. If I want to insert data into a table in my .NET application, what SOL statement do I need? A. Insert into MyTable (ID, Name) Values (42, 'Herman') B. Insert into MyTable Columns (ID, Name), Values (42, 'Herman') C. Insert into MyTable (ID, Name) Values (42, "Herman") D. Insert into MyTable (ID-42, Name 'Herman') 30. Suppose we have this sQL statement: "Select from ScoreTable". Which of these statements is true? A. The value returned will be an integer. B. This will return a count of all columns in ScoreTable. c. We should execute this with the ExecuteScalar method D. We will next be using a MySQLDataReader object.Explanation / Answer
27. (D)
We have the table named GHI (word after from is a table)
We have atleast 3 columns ABC, DEF & JKL
JKL has character data
28. (A)
We can create a new table, add a new row or delete a non-key column from a table. But shouldn't delete a primary key column as it is the identifier for all the other columns uniquely.
29. (A)
30. (D)
Select * returns all the rows in the table, hence (A) & (B) are not correct. We should use Executescalar method only when we are returning a single value from the table like select count(*).
Hence we use the MySQLDataReader object to retrieve rows from the sql query result.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.