Sql Server导出文本文件
先开启服务器配置选项:
EXEC sp_configure 'show advanced options', 1
RECONFIGURE
EXEC sp_configure 'xp_cmdshell', 1
RECONFIGURE
/** 导出文本文件
EXEC master..xp_cmdshell 'bcp dbname..tablename out c:\DT.txt -c -S servername -U sa -P password'
或
EXEC master..xp_cmdshell 'bcp "Select * from dbname..tablename" queryout c:\DT.txt -c -S servername -U sa -P password'
导出到TXT文本,用逗号分开
exec master..xp_cmdshell 'bcp "库名..表名" out "d:\tt.txt" -c -t ,-U sa -P password'
BULK INSERT 库名..表名
from 'c:\test.txt'
WITH (
FIELDTERMINATOR = ';',
ROWTERMINATOR = '\n'
)
相关文档:
1.oracle
sql = "SELECT column_name, data_type, data_length, nullable";
sql += " from user_tab_columns ";
sql += " where table_name='";
sql += $tableName;
sql += "'";
select * from user_tab_comments & ......
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Xml;
using System.Data;
namespace MyDbTest
{
class Program
{
static void Main(string[] args)
{
SqlConnection thisConnection = new SqlConnection(
@ ......
Oracle
SQL
Loader
的详细语法
Oracle
SQL
Loader
的详细语法
SQL
*LOADER
是
ORACLE
的数据加载工具,通常用来将操作系统文件迁移到
ORACLE
数据库中。
SQL
*LOADER
是大型数据
仓库选择使用的加载方法,因为它提供了最快 ......
&nbs ......