Sail E0 Webinar

MCQs

Total Questions : 39 | Page 4 of 4 pages
Question 31. In PHP in order to access MySQL database you will use:
  1.    mysqlconnect() function
  2.    mysql-connect() function
  3.    mysql_connect() function
  4.    sql_connect() function
 Discuss Question
Answer: Option C. -> mysql_connect() function
Question 32. Transactions are used to treat sets of SQL statements atomically.
  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True
Question 33. SQL is not case sensitive. SELECT is the same as select.
  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True
Question 34. Which of the following is not an SQL aggregate function?
  1.    AVG
  2.    SUM
  3.    MIN
  4.    MAX
  5.    CURRENT_DATE()
 Discuss Question
Answer: Option E. -> CURRENT_DATE()
Question 35. What does the DESC keyword do in the following query?
SELECT *
FROM MY_TABLE
WHERE ID > 0
ORDER BY ID, NAME DESC"
  1.    It causes the dataset returned by the query to be sorted in descending order
  2.    It causes rows with the same ID to be sorted by NAME in ascending order
  3.    It causes rows with the same ID to be sorted by NAME in descending order
  4.    It causes rows to be sorted by NAME first and then by ID
  5.    It causes the result set to include a description of the NAME field
 Discuss Question
Answer: Option C. -> It causes rows with the same ID to be sorted by NAME in descending order
Question 36. The ............. statement is used to delete a table.
  1.    DROP TABLE
  2.    DELETE TABLE
  3.    DEL TABLE
  4.    REMOVE TABLE
 Discuss Question
Answer: Option A. -> DROP TABLE
Question 37. What will happen at the end of the following sequence of SQL commands?
BEGIN TRANSACTION
DELETE FROM MYTABLE WHERE ID=1
DELETE FROM OTHERTABLE
ROLLBACK TRANSACTION
  1.    The contents of OTHERTABLE will be deleted
  2.    The contents of both OTHERTABLE and MYTABLE will be deleted
  3.    The contents of OTHERTABLE will be deleted, as will be all the contents of MYTABLE whose ID is 1
  4.    The database will remain unchanged to all users except the one that executes these queries.
  5.    The database will remain unchanged
 Discuss Question
Answer: Option E. -> The database will remain unchanged
Question 38. Use the .............. to delete the data inside the table, and not the table itself?
  1.    DROP TABLE
  2.    DELETE TABLE
  3.    TRUNCATE TABLE
  4.    REMOVE TABLE
 Discuss Question
Answer: Option C. -> TRUNCATE TABLE
Question 39. Can joins be nested?
  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True

Latest Videos

Latest Test Papers