Test your skills through the online practice test: MySQL Quiz Online Practice Test

Related differences

Ques 91. How To Enter Binary Numbers in SQL Statements?

If you want to enter character strings or numeric values as binary numbers, you can quote binary numbers with single quotes and a prefix of (B), or just prefix binary numbers with (0b). Binary numbers will be automatically converted into character strings or numeric values based on the expression contexts. Here are some good examples:

SELECT B'010000010100001001000011' FROM DUAL;
ABC

SELECT 0b1000 + 0 FROM DUAL;
8

Is it helpful? Add Comment View Comments
 

Ques 92. How To Rename an Existing Table in MySQL?

If you want to rename an existing table, you can use the "ALTER TABLE ... RENAME TO" statement. The tutorial script below shows you a good example:

mysql> ALTER TABLE test RENAME TO wb;
Query OK, 0 rows affected (0.01 sec)

Is it helpful? Add Comment View Comments
 

Ques 93. What Are NULL Values?

NULL is a special value that represents no value. Here are basic rules about NULL values:

► NULL presents no value.
► NULL is not the same as an empty string ''.
► NULL is not the same as a zero value 0.
► NULL can be used as any data type.
► NULL should not be used in any comparison options.
► NULL has its own equality operator "IS".
► NULL has its own not-equality operator "IS NOT".

Is it helpful? Add Comment View Comments
 

Ques 94. How To Drop an Existing Table in MySQL?

If you want to delete an existing table and its data rows, you can use the "DROP TABLE" statement as shown in the tutorial script below:

mysql> DROP TABLE tipBackup;
Query OK, 0 rows affected (0.00 sec)

Is it helpful? Add Comment View Comments
 

Ques 95. What Happens If NULL Values Are Involved in Expressions?

If NULL values are used in expressions, the resulting values will be NULL values. In other words:

► Arithmetic expressions with NULL values result NULL values.
► Comparison expressions with NULL values result NULL values.
► Logical expressions with NULL values result NULL values.

The tutorial exercise shows you some interesting examples:

SELECT NULL + NULL FROM DUAL;
NULL

SELECT NULL + 7 FROM DUAL;
NULL

SELECT NULL * 7 FROM DUAL;
NULL

SELECT NULL = NULL FROM DUAL;
NULL

SELECT 0 < NULL FROM DUAL;
NULL

SELECT '' > NULL FROM DUAL;
NULL

SELECT NULL AND TRUE FROM DUAL;
NULL

SELECT NULL OR TRUE FROM DUAL;
1
-- This is contradicting against the rules!

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: