Sql MCQS
Sql MCQS
a) An operating system
c) A programming language
d) A web server
View Answer
Answer: b
Explanation: MySQL is a relational database management system (RDBMS) used for managing and
storing data.
View Answer
Answer: b
Explanation: “MySQL” stands for “My Structured Query Language,” combining “My,” the co-founder’s
daughter’s name, with SQL (Structured Query Language).
a) MySQL AB
b) Microsoft
c) Oracle Corporation
d) Sun Microsystems
View Answer
Answer: a
a) Network
b) Object-oriented
c) Relational
d) Hierarchical
View Answer
Answer: c
Explanation: MySQL is a ‘relational’ DBMS. It is efficient at relating data in two different tables and
joining information from them. Hierarchical and Network DBMS are based on parent-child relationships
of records. Object-oriented DBMS use objects to represent models.
a) NoSQL
b) JavaScript
View Answer
Answer: c
Explanation: MySQL uses SQL (Structured Query Language) to interact with the database.
7. Which is the MySQL instance responsible for data processing?
a) MySQL server
b) SQL
c) MySQL client
View Answer
Answer: a
Explanation: MySQL uses client-server architecture. The MySQL server program runs on the machine
where databases are stored. SQL is a query language used for querying the tables and information
retrieval.
ChatGPT
In this context, the correct answer is a) MySQL server. Here’s a brief explanation:
MySQL server: This is the core component that handles data processing, storage, and management of
databases. It responds to queries from clients and performs the necessary operations on the data.
SQL: This stands for Structured Query Language, which is the language used to communicate with the
database. It is not an instance or component; rather, it's the method through which data is queried
and manipulated.
MySQL client: This is a tool or interface that users interact with to send queries to the MySQL server. It
does not process data itself but rather communicates with the server.
Server daemon program: While this can refer to the server process that runs in the background, it’s a
broader term that doesn’t specifically point to the instance responsible for data processing.
In summary, the MySQL server is the instance that actually processes and manages the data, while the
client and SQL serve as interfaces for interacting with that data.
a) double quotes
b) backticks
c) can’t be quoted
d) single quotes
View Answer
Answer: b
Explanation: An identifier is quoted within the backtick characters ‘`’. This allows use of any character
except a byte with value 0 or 255. Single quotes and double quotes are not allowed when quoting
identifier names.
ChatGPT
Yes, you can use identifiers in MySQL without backticks, as long as they follow certain rules. Here are
some guidelines:
Naming Restrictions: Identifiers must start with a letter or an underscore, followed by letters,
numbers, or underscores. For example, myTable, column1, and _myColumn are valid identifiers.
No Reserved Words: If you use a name that is a reserved keyword (like select or table), you must use
backticks to avoid syntax errors.
Case Sensitivity: While MySQL treats identifiers case-insensitively by default on Windows, they can be
case-sensitive on Unix-based systems depending on the file system.
In general, using backticks is a good practice when you want to ensure that the identifier is parsed
correctly, especially when using special characters or reserved keywords. However, if you stick to
simple, valid names, you can use identifiers without backticks.
a) Column names
b) Event names
d) Indexes
View Answer
Answer: c
Explanation: Column names and indexes are not case sensitive on any platform and neither are
column aliases. Unlike the standard SQL, the names of the log file groups are always case sensitive.
15. Which of the following options tells MySQL to ask for entering the password?
a) -u
b) -p
c) -h
d) -e
View Answer
Answer: b
Explanation: The command ‘mysql -p’ (alternative form: –password) prompts for the password. ‘-h’
(alternative form: –host) specifies the host where the MySQL server is running. ‘-u’ is for specifying the
username.
16. Which statement can be used to specify the sql_mode system variable at runtime?
a) ASSIGN
b) SET
c) CHANGE
d) SPECIFY
View Answer
Answer: b
Explanation: The ‘SET’ statement can change the SQL mode at runtime. For example, the statement
SET sql_mode = ‘ANSI_QUOTES’ can be used by a client in its own session-specific SQL mode.