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

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

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

面试准备

MySQL 面试题与答案

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

问题 81. How To Escape Special Characters in SQL statements?

There are a number of special characters that needs to be escaped (protected), if you want to include them in a character string. Here are some basic character escaping rules:

► The escape character () needs to be escaped as ().
► The single quote (') needs to be escaped as (') or ('') in single-quote quoted strings.
► The double quote (") needs to be escaped as (") or ("") in double-quote quoted strings.
► The wild card character for a single character (_) needs to be escaped as (_).
► The wild card character for multiple characters (%) needs to be escaped as (%).
► The tab character needs to be escaped as (t).
► The new line character needs to be escaped as (n).
► The carriage return character needs to be escaped as (r).

Here are some examples of how to include special characters:

SELECT 'It''s Sunday!' FROM DUAL;
It's Sunday!

SELECT 'Allo, C'est moi.' FROM DUAL; Allo, C'est moi.

SELECT 'MontTuetWedtThutFri' FROM DUAL;
Mon Tue Wed Thu Fri

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

问题 82. How To See the CREATE TABLE Statement of an Existing Table?

SHOW CREATE TABLE test;

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

问题 83. How To Concatenate Two Character Strings?

If you want concatenate multiple character strings into one, you need to use the CONCAT() function. Here are some good examples:
SELECT CONCAT('Welcome',' to') FROM DUAL;
Welcome to

SELECT CONCAT('wb','center','.com') FROM DUAL;
WithoutBook.com

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

问题 84. How To Create a New Table by Selecting Rows from Another Table in MySQL?

Let's say you have a table with many data rows, now you want to create a backup copy of this table of all rows or a subset of them, you can use the "CREATE TABLE ... SELECT" statement. The tutorial script below gives you a good example:

mysql> INSERT INTO tip VALUES (1, 'Learn MySQL',
'Visit www.GlobalGuideLine.com','2006-07-01');
Query OK, 1 row affected (0.62 sec)

mysql> CREATE TABLE tipBackup SELECT * FROM tip;
Query OK, 1 row affected (0.49 sec)
Records: 1 Duplicates: 0 Warnings: 0

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

问题 85. How To Include Numeric Values in SQL statements?

If you want to include a numeric value in your SQL statement, you can enter it directly as shown in the following examples:

SELECT 255 FROM DUAL; -- An integer
255

SELECT -6.34 FROM DUAL; -- A regular number
-6.34

SELECT -32032.6809e+10 FROM DUAL; -- A floating-point value
-3.20326809e+014

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

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

版权所有 © 2026,WithoutBook。