Introduction To Sql(Database ) Questions and Answers

Question 1. You can add a row using SQL in a database with which of the following?
  1.    ADD
  2.    CREATE
  3.    INSERT
  4.    MAKE
Explanation:-
Answer: Option C. -> INSERT

Question 2. The wildcard in a WHERE clause is useful when?
  1.    An exact match is necessary in a SELECT statement.
  2.    An exact match is not possible in a SELECT statement.
  3.    An exact match is necessary in a CREATE statement.
  4.    An exact match is not possible in a CREATE statement.
Explanation:-
Answer: Option B. -> An exact match is not possible in a SELECT statement.

Question 3. Which of the following is the original purpose of SQL?
  1.    To specify the syntax and semantics of SQL data definition language
  2.    To specify the syntax and semantics of SQL manipulation language
  3.    To define the data structures
  4.    All of the above
Explanation:-
Answer: Option D. -> All of the above

Question 4. The SQL WHERE clause:
  1.    limits the column data that are returned.
  2.    limits the row data are returned.
  3.    Both A and B are correct.
  4.    Neither A nor B are correct.
Explanation:-
Answer: Option B. -> limits the row data are returned.

Question 5. The command to remove rows from a table 'CUSTOMER' is:
  1.    REMOVE FROM CUSTOMER ...
  2.    DROP FROM CUSTOMER ...
  3.    DELETE FROM CUSTOMER WHERE ...
  4.    UPDATE FROM CUSTOMER ...
Explanation:-
Answer: Option C. -> DELETE FROM CUSTOMER WHERE ...

Question 6. Which of the following do you need to consider when you make a table in SQL?
  1.    Data types
  2.    Primary keys
  3.    Default values
  4.    All of the above
Explanation:-
Answer: Option D. -> All of the above

Question 7. SQL query and modification commands make up a(n) ________ .
  1.    DDL
  2.    DML
  3.    HTML
  4.    XML
Explanation:-
Answer: Option B. -> DML

Question 8. The Microsoft Access wildcards are ____ and ____ .
  1.    asterisk (*); percent sign (%)
  2.    percent sign (%); underscore (_)
  3.    underscore(_); question mark (?)
  4.    question mark (?); asterisk (*)
Explanation:-
Answer: Option D. -> question mark (?); asterisk (*)

Question 9. When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s):
  1.    LIKE only.
  2.    IN only.
  3.    NOT IN only.
  4.    Both IN and NOT IN.
Explanation:-
Answer: Option D. -> Both IN and NOT IN.

Question 10. Find the SQL statement below that is equal to the following: SELECT NAME FROM CUSTOMER WHERE STATE = 'VA';
  1.    SELECT NAME IN CUSTOMER WHERE STATE IN ('VA');
  2.    SELECT NAME IN CUSTOMER WHERE STATE = 'VA';
  3.    SELECT NAME IN CUSTOMER WHERE STATE = 'V';
  4.    SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');
Explanation:-
Answer: Option D. -> SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');