从sql表创建CSV文件 [英] Create csv file from a sql table

查看:100
本文介绍了从sql表创建CSV文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是sql的新手,但必须使用所有字段从sql表创建一个csv文件,请提供一些简单的建议.

Hi, I am new to sql but have to create a csv file from a sql table using all the fields, easy suggestions please.
Thanks

推荐答案

一个明显的建议是选择数据,然后将其转换为代码中的XML.如果您是"SQL新手",为什么要执行此任务?

数据库中的任何XML功能都将特定于您正在使用的数据库,因此,如果您告诉我们,我们可能会建议您直接从数据库中获取XML.
The obvious suggestion is to select the data, and then turn it into XML in code. Why have you been given this task, if you''re ''new to SQL'' ?

Any XML functionality in your database will be specific the the database you''re using, so if you told us that, we might have suggestions as to getting XML from your DB directly.


,基本上,您可以执行
Well, basically you might execute
SELECT * FROM <tablename>

,然后用您喜欢的语言转换输出.
:-)

and then transform the output with your favourite language.
:-)


我可以从查询表中选择所有记录,只是不知道如何将它们放入一个csv文件中. 谢谢
Hi I can select all the records from the table in a query, just don''t know how to put them into a csv file.
Thanks


这篇关于从sql表创建CSV文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆