精選文章

bcp大量匯出與匯入資料庫資料方法

--匯出-- bcp "select * from [資料庫名稱].[dbo].[資料表名稱]" queryout 匯出檔案名稱.txt -w -U "使用者帳號" -P "使用者密碼" " "...

2020年9月15日 星期二

bcp大量匯出與匯入資料庫資料方法

--匯出--
bcp "select * from [資料庫名稱].[dbo].[資料表名稱]" queryout 匯出檔案名稱.txt -w -U "使用者帳號" -P "使用者密碼"
" " 裡面的語法可以根據需求自行修改

--匯入--
bcp [資料庫名稱].[dbo].[資料表名稱] in 匯入檔案名稱.txt -w -U "使用者帳號" -P "使用者密碼"


參考網址:
https://technet.microsoft.com/zh-tw/library/ms162802(v=sql.105).aspx

http://vito-note.blogspot.com/2013/07/blog-post_7.html

沒有留言: