You want to compare all columns of table A to columns with matching names in table B. You want to select the rows where those have the same values on both tables.
Which query accomplishes this?
Given the data from table t1:
This DELETE command is executed:
DELETE FROM t1 ORDER BY b.a DESC LIMIT 2;
Which set of rows will be deleted by the command?
An application tracks usage of educational courses in a company. Many people can take one course. Each person can take multiple courses. The data has been stored in one table but it is growing too large. You decide to normalize the table.
What would a normalized data model contain?
The city table has the following structure:
Consider the statement with an incorrect field name:
PREPARE countryBYID FROM ‘SELECT country FROM city WHERE ID=?,
What happens if a prepared statement named countryByID already exists when the above statement is executed?
You have a transaction that queries a table at the beginning of the transaction and performs the same query later.
Which two transaction isolation levels guarantee that you get the same results both times?
Examine the structure and content of the MemberLocation table:
You want to have the field location returned in all letters (example: BERLIN).
Which query would you use?
Assume your connection uses SQL mode ANSI_QUOTES.
Which two statements cause a syntax error?
Consider a table my_table , with contents shown:
You execute:
SELECT a b, b a
FROM my_table
WHERE a < s
ORDER BY b;
What does this statement return?
Which three connector/J connection strings can be used to connect to the MYSQL server?
Examine this table that contains over two million rows of data:
CREATE TABLE ‘news_feed’ (
.id’bigint (20) NOT NULL AUTO _INCREMENT,
.news _sources_id’varchar (11) NOT NULL,
.dataline’ datetime NOT NULL,
.headline’ varchar (256) NOT NULL,
.story’ text NOT NULL,.tag varchar (32768) DEFAULT NULL,
PRIMARY KEY (‘id’)
KEY ‘dateline’ ( ‘dateline’)
)
Examine this query that returns 332 rows of date:
SELECT *
FROM news_feed
WHERE DATE(dateline)= ‘2013-01-01’
Which change would show the greatest improvement in the response time of the query?