POstgreSQL笔记
database cluster: a collection of databases managed by a single PostgreSQL server instance 事务(transaction)原子性:from the point of view of other transactions,it either happens completely or not at all. 以下transaction(Alice转账100给Bob),要么都成功,要么失败: UPDATE accounts SET balance = balance - 100.00 WHERE name = 'Alice'; UPDATE accounts SET balance = balance + 100.00 WHERE name = 'Bob'; 标识符(identifier)如果打了双引号,整个引号内视为标识符 UPDATE "my_table" SET "a" = 5; Key words and unquoted identifiers are case insensitive (都会被理解为小写,比如标识符 FOO,foo,"foo"其实是被解释为同一个.但是"FOO"≠"foo") SQL中的常量 mydb=> SELECT E'asd asd'; ERROR: invalid byte sequence for encoding "UTF8": 0x00 3.Unicode Escapes: U&'d0061t+000061' 表示'data' U&'d!0061t!+000061' UESCAPE '!' 4.Dollar-quoted String Constants: $$Dianne's horse$$ $SomeTag$Dianne's horse$SomeTag$ 注释 -- This is a standard SQL comment Alternatively,C-style block comments can be used: /* multiline comment * with nesting: /* nested block comment */ */ (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |