SQL Server



BCP tool
BCP is a program that you run from the command prompt. The following example loads the data from the Data.csv comma-delimited file into
the existing Data_bcp database table.

As described previously in the Prerequisite section, you have to export your Excel data as text before you can use BCP to import it.
BCP can't read Excel files directly.

SQL

Copy TO DataBase
bcp.exe ImportFromExcel..Data_bcp in "D:\Desktop\data.csv" -T -c -t ,


Extract from DataBase
bcp.exe ImportFromExcel..Data_bcp OUT  "D:\Desktop\data.csv" -T -c -t ,


Format File ( if fields not matching)
1- bcp  db11..t11  out t11.txt -T -c   
2- bcp db11..t11 format nul -f t11.fmt -T -c
3- Modify the fields in the the format file to match the columns data in the text file
4- bcp db11..t11 in t11.txt -f t11.fmt  -T
5- Check if there is any error. if not go to SQL Server and select * from db11..t11 


REFERENCE
bcp Foirmat file