热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

MySQL 面试题与答案

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

问题 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

这有帮助吗? 添加评论 查看评论
 

问题 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)

这有帮助吗? 添加评论 查看评论
 

问题 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".

这有帮助吗? 添加评论 查看评论
 

问题 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)

这有帮助吗? 添加评论 查看评论
 

问题 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!

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。