自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

DELETE 中文man頁面

系統(tǒng)
DELETE 從指明的表里刪除滿足 WHERE 子句的行。 如果 WHERE 子句不存在, 效果是刪除表中所有行。結(jié)果是一個有效的空表。

NAME

DELETE - 刪除一個表中的行

SYNOPSIS

DELETE FROM [ ONLY ] table [ WHERE condition ]

DESCRIPTION 描述

DELETE 從指明的表里刪除滿足 WHERE 子句的行。 如果 WHERE 子句不存在, 效果是刪除表中所有行。結(jié)果是一個有效的空表。

Tip: 提示: TRUNCATE [truncate(7)] 是一個 PostgreSQL 擴展, 它提供一個更快的從表中刪除所有行的機制。


 缺省時 DELETE 將刪除所聲明的表和所有它的子表的記錄。 如果你希望只更新提到的表,你應(yīng)該使用 ONLY 子句。


 要對表進行刪除,你必須對它有 DELETE 權(quán)限,同樣也必須有 SELECT 的權(quán)限,這樣才能對符合 condition  的值進行讀取操作。  

PARAMETERS 參數(shù)

table

 一個現(xiàn)存表的名字(可以有模式修飾)。
condition

 一個返回 boolean 類型值的值表達式,它判斷哪些行需要被刪除。

OUTPUTS 輸出


 成功時,DELETE 命令返回形如

DELETE count


 的標簽。 count 是被刪除的行數(shù)。 如果 count 為 0,沒有行匹配 condition (這個不認為是錯誤)。  

EXAMPLES 例子


 刪除所有電影(films)但不刪除音樂(musicals):

DELETE FROM films WHERE kind <> 'Musical';


 清空表 films:

DELETE FROM films;

#p#

NAME

DELETE - delete rows of a table

SYNOPSIS

DELETE FROM [ ONLY ] table [ WHERE condition ]

DESCRIPTION

DELETE deletes rows that satisfy the WHERE clause from the specified table. If the WHERE clause is absent, the effect is to delete all rows in the table. The result is a valid, but empty table.

Tip: TRUNCATE [truncate(7)] is a PostgreSQL extension which provides a faster mechanism to remove all rows from a table.

By default, DELETE will delete rows in the specified table and all its subtables. If you wish to only delete from the specific table mentioned, you must use the ONLY clause.

You must have the DELETE privilege on the table to delete from it, as well as the SELECT privilege for any table whose values are read in the condition.  

PARAMETERS

table
The name (optionally schema-qualified) of an existing table.
condition
A value expression that returns a value of type boolean that determines the rows which are to be deleted.

OUTPUTS

On successful completion, a DELETE command returns a command tag of the form

DELETE count

The count is the number of rows deleted. If count is 0, no rows matched the condition (this is not considered an error).  

EXAMPLES

Delete all films but musicals:

DELETE FROM films WHERE kind <> 'Musical';

Clear the table films:

DELETE FROM films;

責任編輯:韓亞珊 來源: CMPP.net
相關(guān)推薦

2011-08-15 10:21:09

man中文man

2011-08-24 16:48:36

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-25 15:51:06

feof中文man

2011-08-24 17:30:25

reset中文man

2011-08-18 19:15:25

group中文man

2011-08-18 19:21:18

info中文man

2011-08-18 15:10:06

aliases中文man

2011-08-11 18:05:04

chvt中文man

2011-08-11 17:27:20

charset中文man

2011-08-11 18:13:07

clear中文man

2011-08-11 16:48:04

cal中文man

2011-08-11 17:16:43

cce中文man

2011-08-11 17:21:47

chattr中文man

2011-08-11 15:03:21

ACCESS中文man

2011-08-24 10:39:21

COMMIT中文man

2011-08-24 10:31:55

CLUSTER中文man

2011-08-24 10:11:43

bootparam中文man

2011-08-15 17:59:10

lha中文man
點贊
收藏

51CTO技術(shù)棧公眾號