ExamVeda
Login
Home
1
The statement that makes changes to the global attributes of the database is . . . . . . . .
Discuss
Answer & Solution
Answer: Option B
Solution:
This question is about how to change the overall settings of your MySQL database. Think of it like changing the rules of the game!

Out of the options given, the one that changes the database's "big picture" settings is ALTER.

Let's break down why the other options aren't the right fit:

* CHANGE: This is used to modify the structure of a table (like adding or removing columns), not the database itself.
* ALTERNATE: This isn't a valid MySQL command.
* UPDATE: This command is for modifying the data within a table, not the database's settings.

So, the correct answer is Option B: ALTER.
2
Which operator is used to check whether the expression is "NULL"?
Discuss
Answer & Solution
Answer: Option A
Solution:
This question is about finding out how to check if a value in MySQL is empty or missing. In other words, how do we tell if a field is NULL?

NULL means the value is empty, like a blank space.

Out of the options given:

Option A: IS NULL is the correct answer! It's used specifically to check if something is NULL.

Option B: NOT NULL is used when you want to make sure that a field *cannot* be empty.

Option C: ON is used in joins, which are a way to combine data from different tables.

Option D: None of the mentioned is wrong because IS NULL is the right answer.
3
What is the synonym for REAL?
Discuss
Answer & Solution
Answer: Option C
Solution:
This question is about data types in MySQL. Data types tell the database what kind of information each column in your table will hold.

REAL is a data type that represents floating-point numbers, which are numbers with decimal places.

Let's look at the options:

A) FLOAT: This is the correct answer! FLOAT is another data type for floating-point numbers, and it's often used interchangeably with REAL.

B) INT: This represents integers (whole numbers without decimals). It's not a synonym for REAL.

C) DOUBLE: This is also a data type for floating-point numbers but offers higher precision (more decimal places) than REAL and FLOAT.

D) BIT: This represents a single bit of data, which can be either 0 or 1. It's not related to floating-point numbers.

So, the answer is A) FLOAT.
4
What will be the output of the following MySQL statement?
SELECT emp_id, fname, lname
FROM employee
WHERE LEFT (fname, 1) =’F’ OR LEFT (lname, 1) =’F’;
Discuss
Answer & Solution
Answer: Option A
Solution:
This MySQL statement is designed to select employee information based on their first and last names. Let's break down the code:

`SELECT emp_id, fname, lname`: This part tells MySQL to retrieve the employee ID (`emp_id`), first name (`fname`), and last name (`lname`) from the `employee` table.

`FROM employee`: This specifies that the data should be retrieved from the table named `employee`.

`WHERE LEFT(fname, 1) = 'F' OR LEFT(lname, 1) = 'F'`: This is the most important part, the filtering condition.

* `LEFT(fname, 1)`: This function extracts the first letter (position 1) from the `fname` (first name) column.
* `LEFT(lname, 1)`: This function extracts the first letter from the `lname` (last name) column.
* `= 'F'`: This checks if the extracted first letter is equal to 'F'.
* `OR`: This logical operator means that the condition is true if either of the following is true: * The first name starts with 'F'. * The last name starts with 'F'.

Therefore, the correct answer is Option B: Only those employees are selected whose first name started with 'F' but last name can be starts with any other letter.

This statement will return all employees where either their first name or last name starts with 'F'. It doesn't require both names to start with 'F'.
5
The logging option to enable binary log index file is . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
Solution:
This question is asking about a MySQL option that turns on a special file called the binary log index file. This file helps MySQL work more efficiently when dealing with transaction logs.

Let's look at the options:
* Option A: -log-bin-index - This option is the correct answer. It tells MySQL to create and use the binary log index file.
* Option B: -bin-log-index - This is a close call but the correct order is log-bin-index
* Option C: -index-log-bin - This is incorrect because the order of the words doesn't match the actual option name.
* Option D: -index-bin-log - This is also incorrect for the same reason as Option C.

So the answer is Option A: -log-bin-index
6
The NULL value also means . . . . . . . .
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
7
What is the number of attributes in the following SQL table?
CREATE TABLE employee (
		emp_name CHAR(30),
		emp_id INT
	);
Discuss
Answer & Solution
Answer: Option B
Solution:
This question is about understanding the structure of a table in a database. The code you see defines a table called "employee" with two columns:

emp_name: This column stores the name of the employee, and it can hold up to 30 characters (CHAR(30)).

emp_id: This column stores the employee's identification number as an integer (INT).

Since we have two columns (emp_name and emp_id), the correct answer is Option B: 2.
8
Which statement can produce the same output as 'SHOW COLUMNS'?
Discuss
Answer & Solution
Answer: Option A
Solution:
This question asks you to find a MySQL command that does the same thing as 'SHOW COLUMNS'.
'SHOW COLUMNS' is used to see the columns (like the name, age, and city in a table about people) within a specific table in your database.

Let's look at the options:

Option A: DESCRIBE
This is the correct answer! 'DESCRIBE' is the command used to get information about the columns in a table. It's basically a shorter way of saying 'SHOW COLUMNS'.

Option B: DISPLAY, Option C: SEE, Option D: GET
These are not valid commands in MySQL for showing table column information. They might be used in other programming languages, but not in MySQL.

So, the answer is Option A: DESCRIBE
9
What is the option for specifying the executable name while compiling with gcc?
Discuss
Answer & Solution
Answer: Option B
Solution:
This question asks about the command-line option used when compiling a program using the gcc compiler. The compiler takes your code and turns it into an executable file that your computer can run. The options we're looking at here control how this process works.

Option A: -e This option is not used to specify the executable name.
Option B: -o This is the correct option! The -o option is used to specify the output filename for the executable file. For example, if you want to compile a program called myprogram.c and save the executable as myprogram, you would use the command: gcc myprogram.c -o myprogram.
Option C: -a This option is not used for specifying the executable name.
Option D: -b This option is not used for specifying the executable name.

Therefore, the correct answer is Option B: -o
10
In the CREATE TABLE statement, the engine name specified is case sensitive.
Discuss
Answer & Solution
Answer: Option A
Solution:
Option A: True

This option is correct. In MySQL, the engine name specified in the CREATE TABLE statement is case sensitive. This means that specifying "MyISAM" and "myisam" would be treated as different storage engines.

Option B: False

This option is incorrect. The engine name specified in the CREATE TABLE statement is indeed case sensitive in MySQL, contrary to what this option suggests.

Conclusion:

The engine name specified in the CREATE TABLE statement in MySQL is case sensitive, making Option A: True the correct answer.