Mysql miscellaneous
- Which of these is not a comment specifying construct?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The MySQL server understands three types of comments. The single line ‘#’ construct, the multiline /*…*/ construct and the — comment construct. MySQL conforms to the comment standards of SQL.
- The columns containing binary value that include null bytes will print properly using the %s printf() format specifier.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The columns containing binary value including null bytes do not print properly using the %s printf() format specifier. printf() expects a null terminated string. It prints the column value only up to the first null byte.
- What does mysql_fetch_row() return?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
‘mysql_fetch_row()’ returns a MYSQL_ROW value, a pointer to an array of values. If the return value is assigned to a variable named row each value within the row is accessed as row[i].
- How many of the following do not return rows?
SELECT, SHOW, DESCRIBE
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
In MySQL, it is important to note that ‘SELECT’ is not the only statement that returns some rows. Statements like ‘SHOW’, ‘DESCRIBE’, ‘EXPLAIN’ and ‘CHECK TABLE’ do so as well.
- What is the number of attributes in the following table?
CREATE TABLE employee (
stu_name CHAR(50),
stu_add CHAR(50),
stu_id INT
);
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The name of the table created is ’employee’. It has two attributes, namely, ’stu_name’, stu_add and ’stu_id’. The attributes are the columns in a table. stu_name is of type string and stu_id is of type integer.