InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
In UNIX, the name of the option file is __________(a) .my.cnf(b) .my.ini(c) .my.opt(d) .my.opcThis question was posed to me in semester exam.This intriguing question comes from Interacting with MySQL topic in portion General MySQL Use of MySQL |
|
Answer» The CORRECT option is (a) .my.cnf |
|
| 2. |
The connection parameters for setting up MySQL can be stored in an option file to save typing the names every time a connection is established.(a) True(b) FalseI had been asked this question in examination.I'd like to ask this question from Interacting with MySQL in chapter General MySQL Use of MySQL |
|
Answer» The correct choice is (a) True |
|
| 3. |
Which option prints output in table-format when MySQL is run interactively?(a) -t(b) -tf(c) -p(d) -pfThis question was posed to me in semester exam.I want to ask this question from Interacting with MySQL topic in section General MySQL Use of MySQL |
|
Answer» Right answer is (a) -t |
|
| 4. |
To execute the contents of a query file ‘exec.sql’ by feeding it to mysql, which command is used?(a) mysql exec.sql > sampdb(b) mysql sampdb < exec.sql(c) mysql exec.sql(d) mysql execThis question was addressed to me by my school principal while I was bunking the class.I'm obligated to ask this question of Interacting with MySQL in portion General MySQL Use of MySQL |
|
Answer» RIGHT choice is (B) mysql sampdb < exec.sql The best I can EXPLAIN: mysql QUERIES can be run after placing the queries in a file, and then executing it by feeding it to mysql. By default, mysql PRINTS output in a tab-delimited format when it is running in noninteractive mode. |
|
| 5. |
Suppose run_me.sh is a script file. Which command is used to make it executable?(a) chmod +e run_me.sh(b) chmod +a run_me.sh(c) chmod +y run_me.sh(d) chmod +x run_me.shI got this question in an internship interview.This intriguing question comes from Interacting with MySQL topic in chapter General MySQL Use of MySQL |
|
Answer» The correct choice is (d) chmod +x run_me.sh |
|
| 6. |
MySQL can be used to execute script files.(a) True(b) FalseI have been asked this question in final exam.This key question is from Interacting with MySQL topic in chapter General MySQL Use of MySQL |
|
Answer» Right ANSWER is (a) True |
|
| 7. |
On UNIX, statements entered in ‘MySQL’ are saved in which file?(a) .mysql_queries(b) .queries(c) .mysql_history(d) .historyThis question was addressed to me in final exam.This interesting question is from Interacting with MySQL topic in chapter General MySQL Use of MySQL |
|
Answer» RIGHT CHOICE is (c) .mysql_history Explanation: Statements ENTERED in ‘MYSQL’ are stored in the file named ‘.mysql_history’. This file is located in the home directory itself. The SQL statements can be directly pasted into this file. |
|
| 8. |
What does Control-_ do in MySQL input editor?(a) copies to clipboard(b) pastes from clipboard(c) undoes last change(d) deletes the current lineI had been asked this question in a job interview.The question is from Interacting with MySQL topic in chapter General MySQL Use of MySQL |
|
Answer» The correct choice is (c) undoes last change |
|
| 9. |
The command to move the cursor to the beginning of line in MySQL input editor is?(a) Ctrl-A(b) Ctrl-E(c) Ctrl-D(d) Esc-aThis question was posed to me by my college director while I was bunking the class.This interesting question is from Interacting with MySQL topic in portion General MySQL Use of MySQL |
|
Answer» The correct OPTION is (a) Ctrl-A |
|
| 10. |
SHOW DATABASES lists the databases in the server to which you are connected.(a) True(b) FalseThis question was addressed to me during an online interview.My question is from MySQL Setup topic in section General MySQL Use of MySQL |
|
Answer» The correct choice is (a) True |
|
| 11. |
To see the table structure, which of the following SQL commands is issued?(a) DESCRIBE tbl_name(b) VIEW tbl_name(c) SELECT TABLE tbl_name(d) SELECT tbl_nameI got this question by my college professor while I was bunking the class.Origin of the question is MySQL Setup topic in chapter General MySQL Use of MySQL |
|
Answer» Right OPTION is (a) DESCRIBE tbl_name |
|
| 12. |
Suppose you want to select a database named ‘sampledb’ as the default database. Which of the following commands do you use?(a) SELECT DATABASE()(b) SELECT DATABASE sampledb(c) USE DATABASE sampledb(d) USE sampledbThis question was posed to me in exam.Asked question is from MySQL Setup topic in portion General MySQL Use of MySQL |
|
Answer» RIGHT choice is (d) USE sampledb Easiest explanation: ‘USE sampledb’ selects sampledb as the DEFAULT database. Initially, ‘SELECT DATABASE();’ command displays ‘NULL’, SINCE no database is selected by default. The other TWO are not valid commands. |
|
| 13. |
The query ‘SELECT NOW()’ shows the current _____________(a) table(b) time only(c) date only(d) date and timeThis question was addressed to me during an interview.I'm obligated to ask this question of MySQL Setup in division General MySQL Use of MySQL |
|
Answer» Correct choice is (d) date and time |
|
| 14. |
Which of the following options tells mysql to ask for entering the password?(a) -e(b) -p(c) -u(d) -hThis question was addressed to me by my college director while I was bunking the class.My question is taken from MySQL Setup topic in portion General MySQL Use of MySQL |
|
Answer» The correct answer is (b) -P |
|
| 15. |
MySQL client runs on the machine containing the databases and servers connect to the client over a network.(a) True(b) FalseThis question was addressed to me in a national level competition.My query is from MySQL Setup topic in chapter General MySQL Use of MySQL |
|
Answer» The correct ANSWER is (B) False |
|
| 16. |
Which clause is used to sort query elements?(a) GROUP(b) GROUP BY(c) ORDER(d) ORDER BYI got this question in a national level competition.The origin of the question is MySQL Setup topic in division General MySQL Use of MySQL |
|
Answer» Correct ANSWER is (d) ORDER BY |
|
| 17. |
What does comparing a known value with NULL result into?(a) zero(b) a positive value(c) a negative value(d) nullI got this question by my school principal while I was bunking the class.This key question is from MySQL Setup in chapter General MySQL Use of MySQL |
|
Answer» Correct answer is (d) null |
|
| 18. |
The NULL value also means ___________(a) value equal to zero(b) unknown value(c) negative values(d) a large valueI have been asked this question by my college director while I was bunking the class.My enquiry is from MySQL Setup topic in chapter General MySQL Use of MySQL |
|
Answer» The correct ANSWER is (b) unknown value |
|
| 19. |
Which operator is used to perform integer divisions in MySQL?(a) /(b) \(c) DIV(d) //I had been asked this question in semester exam.This interesting question is from MySQL Setup topic in chapter General MySQL Use of MySQL |
|
Answer» Right answer is (C) DIV |
|
| 20. |
The special database that always exists after setting up MySQL in a computer is __________(a) sampdb(b) mysql(c) information_schema(d) readme_dbThis question was posed to me in homework.I would like to ask this question from MySQL Setup topic in portion General MySQL Use of MySQL |
|
Answer» The correct option is (c) information_schema |
|
| 21. |
Which of the following clauses is used to display information that match a given pattern?(a) LIKE(b) WHERE(c) IS(d) SAMEThis question was posed to me in an interview for job.Question is from MySQL Setup topic in chapter General MySQL Use of MySQL |
|
Answer» The correct option is (a) LIKE |
|
| 22. |
In MySQL databases, the structure representing the organizational views of the entire databases is ____________(a) Schema(b) View(c) Instance(d) TableI got this question by my school teacher while I was bunking the class.This question is from Basic Database Terminology topic in division General MySQL Use of MySQL |
|
Answer» CORRECT option is (a) Schema Explanation: The schema in a database gives a BLUEPRINT of the structure. A VIEW is an OBJECT that can be generated with a query. A table is a COLLECTION of records. An instance is analogous to a class object. |
|
| 23. |
The MySQL server used in its client/server architecture is _______________(a) mysqla(b) mysqlb(c) mysqlc(d) mysqldThis question was posed to me during a job interview.I would like to ask this question from Basic Database Terminology topic in chapter General MySQL Use of MySQL |
|
Answer» Right option is (d) mysqld |
|
| 24. |
Which is the MySQL instance responsible for data processing?(a) MySQL client(b) MySQL server(c) SQL(d) Server daemon programI got this question in an interview for job.This question is from Basic Database Terminology in division General MySQL Use of MySQL |
|
Answer» Correct ANSWER is (b) MYSQL server |
|
| 25. |
How is communication established with MySQL?(a) SQL(b) Network calls(c) A programming language like C++(d) APIsI had been asked this question during an internship interview.The question is from Basic Database Terminology in section General MySQL Use of MySQL |
|
Answer» Correct ANSWER is (a) SQL |
|
| 26. |
What represents a ‘tuple’ in a relational database?(a) Table(b) Row(c) Column(d) ObjectThis question was posed to me in an interview.I need to ask this question from Basic Database Terminology in chapter General MySQL Use of MySQL |
|
Answer» Correct answer is (b) Row |
|
| 27. |
What represents an ‘attribute’ in a relational database?(a) Table(b) Row(c) Column(d) ObjectThis question was posed to me in an interview for job.Question is taken from Basic Database Terminology in portion General MySQL Use of MySQL |
|
Answer» The CORRECT OPTION is (c) Column |
|
| 28. |
MySQL is freely available and is open source.(a) True(b) FalseThis question was posed to me in a job interview.My question comes from Basic Database Terminology in section General MySQL Use of MySQL |
|
Answer» RIGHT option is (a) True The explanation is: MySQL is free and open SOURCE. It’s source CODE is available for USE and is freely downloadable. It includes the MySQL SERVER, the world’s most popular open source database, and MySQL Cluster, a real-time, open source transactional database. |
|
| 29. |
What is data in a MySQL database organized into?(a) Objects(b) Tables(c) Networks(d) File systemsThe question was asked in unit test.This key question is from Basic Database Terminology topic in portion General MySQL Use of MySQL |
|
Answer» RIGHT answer is (b) Tables Easy explanation: Since MYSQL is an RDBMS, it’s data is organised in tables for ESTABLISHING relationships. A table is a collection of rows and columns, where each row is a record and columns DESCRIBE the feature of records. |
|
| 30. |
Which type of database management system is MySQL?(a) Object-oriented(b) Hierarchical(c) Relational(d) NetworkI got this question by my college professor while I was bunking the class.I'd like to ask this question from Basic Database Terminology in division General MySQL Use of MySQL |
|
Answer» The CORRECT answer is (c) Relational |
|