How can we get the number of records or rows in a table?
Both a and c above
With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
SELECT * FROM Persons SORT BY 'FirstName' DESC
SELECT * FROM Persons ORDER BY FirstName DESC
SELECT * FROM Persons ORDER FirstName DESC
SELECT * FROM Persons SORT 'FirstName' DESC
If an ENUM column is declared NOT NULL, its default value is the first element of the list of allowed values.
False, ENUM column cannot be null
False, its default value is the last element of the list of allowed values
Both b and c
The “Mysql command line tool” formats are bounded by
A view is nothing but a ________ table or a stored query
How many distinct, different values can you hold in an enum field?
2 (True and False)
What is DCL?
Data Control Language
Data Content Language
Data Column Language
Defined Control Language
Which of these is a valid call to a function (watch the spaces carefully!)
CONCAT( A , B )
CONCAT ( A , B )
CONCAT( "A" , "B" )
CONCAT ( "A" , "B" )
What is DDL?
Data Definition Language
Data Degenerated Language
Data Delivered Language
Defined Definition Language
How do I find out all databases starting with ‘test to which I have access to?
SHOW DATABASES LIKE ‘%test%’;
SHOW DATABASES LIKE ‘%test;
SHOW DATABASES LIKE ‘'test'%’;
SHOW DATABASES LIKE ‘test%’;
Which of the following file extension is a valid MyISAM file extension?
On executing DELETE command, if you get an error "foreign key constraint" what does it imply?
Foreign key not defined
Table is empty
Data is present in the other table
Mysql command line tool is used to show “how many rows are returned and how long SQL command took to execute”
What is Row?
A row is a unit of data with related data items stored as one item in multiple columns in a table
A row is a unit of data with related data items stored as multiple item in one column in a table
A row is a unit of data with related data items stored as one item in two columns in a table
A row is a unit of data with related data items stored as one item in one column in a table
With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?
SELECT * FROM Persons WHERE FirstName='%a%'
SELECT * FROM Persons WHERE FirstName LIKE '%a'
SELECT * FROM Persons WHERE FirstName='a'
SELECT * FROM Persons WHERE FirstName LIKE 'a%'
SELECT * FROM Persons WHERE FirstName='a'"
MySQL supports the complete SQL99 standard
What will happen at the end of the following sequence of SQL commands?
DELETE FROM MYTABLE WHERE ID=1
DELETE FROM OTHERTABLE
The contents of OTHERTABLE will be deleted
The contents of both OTHERTABLE and MYTABLE will be deleted
The contents of OTHERTABLE will be deleted, as will be all the contents of MYTAB whoID is 1
The database will remain unchanged to all users except the one that executes these queries.
The database will remain unchanged
Transactions are used to treat sets of SQL statements atomically.
With SQL, how can you insert a new record into the "Persons" table?
INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
INSERT ('Jimmy', 'Jackson') INTO Persons
INSERT VALUES ('Jimmy', 'Jackson') INTO Persons
Can DISTINCT command be used for more than one column?
Which of the following is NOT supported by MySQL
Temporary (Hash) Tables
Regular Expression Matching
A user with RELOAD priveliges can
Can reset passwords for any mysql user account
Perform certain "admin type" operations such as flush table and logs from memory to disc, but can't normally do anything "dangerous"
Can repopulate the databases and tables from a backup
Can restart the MySQL daemon in addition to any other priveliges he might also have
Where is metadata stored in MySQL?
In the MySQL database metadata
In the MySQL database metasql
In the MySQL database mysql
None of the above is correct.
The program called mysql is
There isn't a program just called mysql
A wrapper through which Java clients must connect to the databases
A client program that lets you send SQL commands to the database engine
The database engine
A program that starts up and shuts down the database engine
The USE command?
Is used to load code from another file
Has been deprecated and should be avoided for security reasons
Is a pseudonym for the SELECT command
Should be used to choose the database you want to use once you've connected to MySQL
Which of the following is the correct SQL statement to use to remove rows from a table?
The result of a SELECT statement can contain duplicate rows.
None of the above
Which SQL statement is used to update data in a database?
Which of the following is NOT available in MySQL?
In a SELECT with a GROUP BY clause, a WHERE clause, and a HAVING clause, the WHERE conditions are applied before the HAVING conditions.
Either True or False