You attempt to create a temporary table by using the following statement:
CREATE TEMPORARY TABLE employeesMAIN
SELECT * FROM employees1
UNION ALL
SELECT * FROM employees2;
What is the result?
Consider the table structure shown by this output:
Mysql> desc city:
5 rows in set (0.00 sec)
You execute this statement:
SELECT -,-, city. * FROM city LIMIT 1
What is returned?
An application packs several fields of information into the details column of the table sensors. The first six characters of that data represent a location code.
Example: "ABCDEFOO
You have a database 'dev' that contains 15 tables, all of which use the CHARACTER SET 'utfs' and the COLLATION 'utfs_general_ci'.
You perform the command:
ALTER DATABASE 'dev' CHARACTER SET ='latin' COLLATION='latin1'_swedish_ci'
What is the result?
You attempt to create two new tables:
CREATE TABLE 'warehouse' (
'id' int (11) NOT NULL AUTO_INCREMENT,
'name' varchar (20) NOT NULL,
'phone' varchar (20) NOT NULL,
PRIMARY KEY (' id)
) ENGINE=MyISAM
CREATE TABLE 'warehouseitem' (
'warehouse_id' bigint (11) NOT NULL,
'item_id' int (11) NOT NULL,
'count' int(11) NOT NULL DEFAULT '0',
KEY "warehouse_id' ('warehouse-id) ,
FOREIGN KEY (warehouse_id) REFFERENCES warehouse (id)
) ENGINE= InnoDB
You get this error :
ERROR 1215 ( HYooo): cannot add foreign key constraint
Which two changes are required to permit these statements to execute without any error?