monetdb:导出查询结果
monetdb: export query result
如何导出 monetdb 查询结果(例如导出到 csv 文件)?
手册说:
Copy into File
The COPY INTO command with a file name argument allows for fast
dumping of a result set into an ASCII file. The file must be
accessible by the server and a full path name may be required. The
file STDOUT can be used to direct the result to the primary output
channel.
The delimiters and NULL AS arguments provide control over the layout
required.
COPY subquery INTO file_name [ [USING] DELIMITERS
field_separator [',' record_separator [ ',' string_quote ]]] [ NULL AS
null_string ]
https://www.monetdb.org/Documentation/Manuals/SQLreference/CopyInto
我正在尝试各种语法但没有结果。
示例查询:
select * from test;
失败示例:
copy select * from test into test.csv;
copy "select * from test" into test.csv;
好的。缺少撇号和完整路径。分隔符也很有用
copy select * from test into '/home/user/test.csv' using delimiters ',';
如何导出 monetdb 查询结果(例如导出到 csv 文件)?
手册说:
Copy into File
The COPY INTO command with a file name argument allows for fast dumping of a result set into an ASCII file. The file must be accessible by the server and a full path name may be required. The file STDOUT can be used to direct the result to the primary output channel.
The delimiters and NULL AS arguments provide control over the layout required.
COPY subquery INTO file_name [ [USING] DELIMITERS field_separator [',' record_separator [ ',' string_quote ]]] [ NULL AS null_string ]
https://www.monetdb.org/Documentation/Manuals/SQLreference/CopyInto
我正在尝试各种语法但没有结果。
示例查询:
select * from test;
失败示例:
copy select * from test into test.csv;
copy "select * from test" into test.csv;
好的。缺少撇号和完整路径。分隔符也很有用
copy select * from test into '/home/user/test.csv' using delimiters ',';