Mysql Mcqs
Q.1: Assume, you have a table inventory(id int, description text, price int). How can you change the type of price from int to decimal(10,2)?
A. alter table inventory modify price decimal(10,2)0
B. Both are correct.
C. alter table inventory change column price decimal(10,2)7
D. This is not possible.
Q.2: Which of the following are true concerning indexes?3
A. None are correct
B. Indexes can only be done on columns containing numerical data=
C. Indexes will slow down inserts, but speed up selects4
D. Indexes will slow down selects, but speed up inserts4
Q.3: Which of the following is not a Spatial Data Type?2
A. CIRCLE
B. GEOMETRY CIRCLE POINT POLYGON
C. No Option
D. No Option
Q.4: Which of the following statements can be used to remove user accounts from MySQL?Q
A. DELETE USER user;
B. DROP USER user;
C. None of these
D. REVOKE USER user;
Q.5: What term describes the number of unique values in an index?<
A. Cardinality
B. Seq-in-index
C. Collation
D. Sub-part
Q.6: What happens when a Unique or Primary Key column is set to AUTO INCREMENT, and an INSERT would exceed the maximum value for that column?
A. None of these
B. It stops incrementing, producing a duplicate key error.7
C. The value &#34;wraps around&#34; to the lowest value and continues incrementing.P
D. Further rows will be inserted with the same value.2
Q.7: What tests whether integer column i is at least 1 but no more than 10?F
A. BETWEEN 1 AND 10
B. IN INTERVAL(1, 10)
C. IN INTERVAL(0, 11)
D. BETWEEN 0 AND 11
Q.8: What does this statement: DELETE FROM xpto WHERE 1;3
A. Delete all records in table &#039;xpto&#039; but does not reset the AUTO_INCREMENT sequence[
B. Delete all records in table &#039;xpto&#039; and reset the AUTO_INCREMENT value to 0;U
C. Throw an error depending on sql mode$
D. Delete all records in table &#039;xpto&#039; and resets the AUTO_INCREMENT sequenceS
Q.9: Assign the custom `foo` variable with the value `bar`5
A. SET $foo= &#039;bar&#039;;
B. $foo = &#039;bar&#039;;
C. SET @foo = &#039;bar&#039;;
D. VAR @foo = &#039;bar&#039;;
Q.10: Why would you turn on delay_key_write?&
A. You do not need to turn this on, delay_key_write is enabled by default after the installation of MySQL.g
B. Because turning delay_key_write on ensures that the database will not flush the MyISAM key file after every single write.y
C. No Option
D. No Option

Related Mcqs

All Subject Mcqs