如何正确使用SQL outfile命令?

编程入门 行业动态 更新时间:2024-10-19 23:39:16
本文介绍了如何正确使用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命令?

本文发布于:2023-10-13 10:10:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1487659.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何正确   命令   SQL   outfile

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!