Home [SQL] SQL語句中單引號、雙引號的作用
Post
Cancel

[SQL] SQL語句中單引號、雙引號的作用

單引號「'

一般表示一個字串

1
update customer set name = 'Rii'

雙引號「"

一般表示一個變量,如:資料表名、欄位名、別名等

1
2
update "customer" set "name" = 'Rii'
select name as "姓名" from customer

rrroger.github.io - SQL语句转义字符

This post is licensed under CC BY 4.0 by the author.