Mysql Setup
- In the following code, InnoDB is __________.
CREATE TABLE Employee(
Emp_name CHAR(30),
Emp_id INT(10),
PRIMARY KEY (Emp_id)
) ENGINE = InnoDB;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
‘InnoDB’ is the name of the ‘storage engine’ for the above table. The ‘ENGINE’ clause is used to specify the name of the storage engine that MySQL should use to handle the table being created. MySQL has several storage engines with its own properties.
- Which of the following clauses is used to display information that match a given pattern?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The ‘LIKE’ clause filters information that match a given pattern. ‘WHERE’ clause selects information that is specified by a condition. ‘IS’ is used to match the exact condition specified.
- What column names are displayed when this command is executed?
SHOW COLUMNS FROM Table_Name LIKE '%name';
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The wildcard ‘%’ is used to indicate that any number of characters can replace it. All column names that end in ‘name’ are displayed. Additional information of columns like type and size are listed.
- The special database that always exists after setting up MySQL in a computer is __________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
After installation of MySQL, ‘information_schema’ is the special database that always exists. ‘mysql’ can be seen depending on access rights. It holds the grant tables. ‘sampdb’ and ‘readme_db’ do not exist by default.
- What is the host name in the following command?
mysql -h interview.mania.com -p -u sampadam
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The ‘-h’ option specifies the hostname of the server. The ‘interview.mania.com’ is the complete host name. The ‘-p’ option prompts for the account’s password and ‘-u’ specifies the user name.