postgres=# \help SELECT Command: SELECT Description: retrieve rows from a table or view Syntax: [ WITH [ RECURSIVE ] with_query [, ...] ] SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ] [ * | expression [ [ AS ] output_name ] [, ...] ] [ FROM from_item [,...
postgres=# \help SELECT Command: SELECT Description: retrieve rows from a table or view Syntax: [ WITH [ RECURSIVE ] with_query [, ...] ] SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ] [ * | expression [ [ AS ] output_name ] [, ...] ] [ FROM from_item [,...
Description: remove a table Syntax: DROP TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] URL: https://www.postgresql.org/docs/16/sql-droptable.html postgres=# 查看表列表命令 1 2 3 4 5 6 7 8 9 10 11 ci_database_test01=# \dtS List of relations Schema | Name |Type...
postgres=#\help SELECTCommand:SELECTDescription:retrieve rows from a table or view Syntax:[ WITH [ RECURSIVE ] with_query [, ...] ]SELECT[ ALL | DISTINCT [ ON ( expression [, ...] ) ] ] [* | expression [ [ AS ] output_name ] [, ...] ] [ FROM from_item [, ...] ] [ ...
Syntax: CREATE TABLESPACE tablespace_name [OWNER{new_owner|CURRENT_ROLE|CURRENT_USER|SESSION_USER}] LOCATION'directory' [WITH(tablespace_option=value[,...])] URL:https://www.postgresql.org/docs/14/sql-createtablespace.html 示例: postgres=#CREATE TABLESPACE test LOCATION'/pgdb/data/test'; ...
doc_id bigint not null references docs on delete cascade, -- 文档ID content text, -- chunk内容 token_count int, -- chunk中的token数量 embedding vector(1536), -- chunk转化成的embedding向量 slug text, -- 为标题生成唯一标志 heading text -- 标题 ...
postgres=# \helpSELECTCommand:SELECTDescription:retrieve rows from a table or viewSyntax:[WITH[RECURSIVE]with_query[,...]]SELECT[ALL|DISTINCT[ON(expression[,...])]][*|expression[[AS]output_name][,...]][FROMfrom_item[,...]][WHEREcondition][GROUPBYgrouping_element[,...]][HAVINGcondition...
引用列名 是被引用的表中与外键关联的列的名称; ON DELETE 动作 定义了在引用表中删除行时要执行的动作,可以是 CASCADE、SET NULL、SET DEFAULT 或RESTRICT; ON UPDATE 动作 定义了在引用表中更新行时要执行的动作,可以是 CASCADE、SET NULL、SET DEFAULT 或RESTRICT。以下...
Syntax: [ WITH [ RECURSIVE ] with_query [, ...] ] SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ] [ * | expression [ [ AS ] output_name ] [, ...] ] [ FROM from_item [, ...] ] [ WHERE condition ] ...
DELETE FROM films USING producers WHERE producer_id = producers.id AND producers.name = 'foo'; What is essentially happening here is a join betweenfilmsandproducers, with all successfully joinedfilmsrows being marked for deletion. This syntax is not standard. A more standard way to do it is ...