如何正确使用SQL outfile命令? [英] How to use SQL outfile command correctly?

查看:132
本文介绍了如何正确使用SQL outfile命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我找不到答案.我想做的是将我的sql表淘汰成.txt文件或csv. (如果可以,请输入txt)

I couldn't find an answer so far. What I want to do is to outfile my sql table into a .txt file or csv. (txt if possible)

我尝试的是:

SELECT * FROM [mydb] INTO OUTFILE 'd:\scripts\powershell\123.txt';

返回是:

Incorrect syntax near the keyword 'INTO'.

我还尝试仅选择一些列.还尝试过先创建文本文件...

I also tried to select just some of the columns. Also tried to create the text file first...

我使用SQL-Server-2012

I use SQL-Server-2012

推荐答案

右键单击

DataBase --> Right Click --> Tasks --> ExportData

Sql Server Import/Export Wizard将打开.提供所有信息,例如DataSource,ServerName和Databases Name,Table Name,单击Next,然后提供有关目的地的所有信息.

Sql Server Import/Export Wizard will open. Provide all the information like DataSource , ServerName and Databases Name, Table Name, Click Next and then provide all the information about the destination .

这篇关于如何正确使用SQL outfile命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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