1. Question: Which of the following will raise MySQL's version of an error?

    A
    SIGNAL

    B
    RAISE

    C
    ERROR

    D
    None

    Note: Not available
    1. Report
  2. Question: Which query will return values containing strings "Pizza", "Burger", or "Hotdog" in the database?

    A
    SELECT * FROM fiberbox WHERE field REGEXP 'Pizza|Burger|Hotdog';

    B
    SELECT * FROM fiberbox WHERE field LIKE '%Pizza%' OR field LIKE '%Burger%' OR field LIKE '%Hotdog%';

    C
    SELECT * FROM fiberbox WHERE field = '%Pizza%' OR field = '%Burger%' OR field = '%Hotdog%';

    D
    SELECT * FROM fiberbox WHERE field = '?Pizza?' OR field = '?Burger?' OR field = '?Hotdog?';

    Note: Not available
    1. Report
  3. Question: Which datatype is used to store binary data in MySQL?

    A
    BLOB

    B
    BIGINT

    C
    INT

    D
    Both BLOB and BIGINT

    Note: Not available
    1. Report
  4. Question: Which of the following will reset the MySQL password for a particular user?

    A
    UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='username';

    B
    UPDATE mysql.user SET Password='password' WHERE User='username';

    C
    UPDATE mysql.user SET Password=RESET('password') WHERE User='username';

    D
    None

    Note: Not available
    1. Report
  5. Question: Which of the following is the best way to modify a table to allow null values?

    A
    ALTER TABLE table_name MODIFY column_name varchar(255) null

    B
    ALTER TABLE table_name MODIFY column_name VARCHAR(255)

    C
    ALTER TABLE table_name CHANGE column_name column_name type DEFAULT NULL

    D
    ALTER table_name MODIFY column_name varchar(255) null

    Note: Not available
    1. Report
  6. Question: Which of the following will dump the whole MySQL database to a file?

    A
    mysql -e "select * from myTable" -u myuser -pxxxxxxxxx mydatabase > mydumpfile.txt

    B
    mysql -e "select * from myTable" mydatabase > mydumpfile.txt

    C
    SELECT * from myTable FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'

    D
    None

    Note: Not available
    1. Report
  7. Question: Which of the following statements is true regarding character sets in MySQL?

    A
    The default character set of MySQL is UTF-8.

    B
    lang.cnf sets the default character set for MySQL databases.

    C
    SET CHARSET utf8 will set the character set of data to be imported to UTF-8.

    D
    None

    Note: Not available
    1. Report
  8. Question: Which of the following is an alternative to groupwise maximum ranking (ex. ROW_NUMBER() in MS SQL)?

    A
    Using subqueries

    B
    Using variables in a MySQL query

    C
    Using self-join

    D
    MySQL also supports ROW_NUMBER()

    Note: Not available
    1. Report
  9. Question: Consider the following tables: Books ------ BookId BookName AuthorId SubjectId PopularityRating (the popularity of the book on a scale of 1 to 10) Language (such as French, English, German etc) Subjects --------- SubjectId Subject (such as History, Geography, Mathematics etc) Authors -------- AuthorId AuthorName Country Which query will determine how many books have a popularity rating of more than 7 on each subject?

    A
    select subject,count(*) as Books from books,subjects where books.popularityrating > 7

    B
    select subject,count(*) as Books from books,subjects where books.authorid=subjects.authorid and books.popularityrating > 7 group by subjects.subject

    C
    select subject,count(*) as Books from books,subjects where books.subjectid=subjects.subjectid and books.popularityrating = 7 group by subjects.subject

    D
    select subject,count(*) as Books from books,subjects where books.subjectid=subjects.subjectid and books.popularityrating > 7 group by subjects.subject

    Note: Not available
    1. Report
  10. Question: Which of the following statements are true about SQL injection attacks?

    A
    Wrapping all variables containing user input by a call to mysql_real_escape_string() makes the code immune to SQL injections.

    B
    Parametrized queries do not make code less vulnearable to SQL injections.

    C
    SQL injections are not possible, if only emulated prepared statements are used.

    D
    Usage of later versions of MySQL, validation, and explicit setting of the charset of user input are valid measures to decrease vulnerability to SQL injections.

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd