GBase Migration Toolkit 迁移工具手册-1.2(3)

SQL 注释符号示例
这些示例说明了使用 SQL 注释指示符的不同方式。
以下示例使用了每一种注释符号,包括双连字符(--)、花括号({ })、C 语言样式(/* . . . 
*/)的注释符号在 SQL 语句后注释。该注释与语句显示在同一行。
SELECT * FROM customer; -- Selects all columns and rows
SELECT * FROM customer; {Selects all columns and rows}
SELECT * FROM customer; /*Selects all columns and rows*/
以下三个示例与前面的示例使用了相同的 SQL 语句和相同的注释,但注释自成一行:
SELECT * FROM customer; 
 -- Selects all columns and rows
SELECT * FROM customer; 
 {Selects all columns and rows}
SELECT * FROM customer; 
 /*Selects all columns and rows*/
以下示例中,用户输入与前面的示例中相同的 SQL 语句,但现在输入一条多行注释(或者对于双
连字符有两条注释):
SELECT * FROM customer;
 -- Selects all columns and rows
 -- from the customer table
 
SELECT * FROM customer;
 {Selects all columns and rows
 from the customer table}
SELECT * FROM customer;
 /*Selects all columns and rows
 from the customer table*/
一条 SQL 语句中出现任意三种样式的注释:
SELECT * -- Selects all columns and rows
 FROM customer; -- from the customer table
 
SELECT * {Selects all columns and rows}
 FROM customer; {from the customer table}
 
SELECT * /*Selects all columns and rows*/
 FROM customer; /*from the customer table*/
如果您使用花括号或 C 语言样式的注释被成对的开始和结束符号定界,那么结束注释符号必须与
开始注释符号的样式相同。
SQL 注释中的非 ASCII 字符
如果数据库语言环境支持非 ASCII 字符(包括多字节字符),则可以在 SQL 注释中输入非
ASCII 字符。关于 SQL 注释 GLS 方面的进一步信息,请参阅 GBase 8s GLS 用户指南。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值