1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. Question: Which of the following is an alternative to Subquery Factoring (ex. the 'WITH' clause in MS SQL Server)?

    A
    The 'IN' clause

    B
    Using temporary tables and inline views

    C
    The 'INNER JOIN' clause

    D
    Using subqueries

    Note: Not available
    1. Report
  10. Question: Suppose a table has the following records: +--------------+-------------+----------------+ | Item | Price | Brand | +--------------+-------------+----------------+ | Watch | 100 | abc | | Watch | 200 | xyz | | Glasses | 300 | bcd | | Watch | 500 | def | | Glasses | 600 | fgh | +--------------+-------------+----------------+ Which of the following will select the highest-priced record per item?

    A
    select item, brand, price from items where max(price) order by item

    B
    select * from items where price = max group by item

    C
    select item, brand, max(price) from items group by item

    D
    select * from items where price > 200 order by item

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