文章分类 -  SqlServer

转载:C# 获取数据库表信息与列信息
摘要:conn.Open();string[] restrictions = new string[4];restrictions[1] = "dbo";DataTable table = conn.GetSchema("Tables", restrictions);conn.Close();返回的table是表的所有信息,而不仅仅是名字,可以通过如下语句查看这些信息:foreach (System.Data.DataRow row in table.Rows){foreach (System.Data.DataColumn col in table.Colu 阅读全文

posted @ 2013-09-19 10:54 砖头 阅读(691) 评论(0) 推荐(0)

bcp将文本文件循环导入SqlServer
摘要:数据库Test中有表Files和Data,Files中保存着txt文本的地址,写个存储将txt文本地址循环读出并使用bcp命令将txt文本里面的数据导入sqlserver中,测试了效率极高,导数据的朋友可做参考 CREATE PROCEDURE importASdeclare @FilePath varchar(50)declare @sql varchar(1000)DECLARE table_... 阅读全文

posted @ 2006-04-18 17:37 砖头 阅读(858) 评论(0) 推荐(0)

导航