Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linq Óësql·½Ê½ Ìí¼ÓÊý¾ÝЧÂʱȽÏ

Ëù²âÊÔ»·¾³Îª£ºMs sqlserver 2008£¬visual studio 2008
²âÊÔÊý¾ÝΪ10ÍòÌõ
 Linq·½Ê½ ´úÂ룺
/// <summary>
/// Linq ·½Ê½
/// </summary>
public static void Linq_insert()
{
DataClassesDataContext dataContext = new DataClassesDataContext();
for (int i = 0; i < 100000; i++)
{
Bulletin bulletin = new Bulletin()
{
ID = 10000 + i,
content = "18:00Ö±²¥ÑǹÚÊ׶ûVSɽ¶«£¬¾´ÇëÆÚ´ý£¡£¡£¡",
date = DateTime.Now,
title = "18:00Ö±²¥ÑǹÚÊ׶ûVSɽ¶«"
};
dataContext.Bulletin.InsertOnSubmit(bulletin);
}
dataContext.SubmitChanges();
}
SQL ·½Ê½  ´úÂ룺
public static void SQL_insert()
{
SqlConnectionStringBuilder strB = new SqlConnectionStringBuilder();
strB.DataSource = ".";
strB.InitialCatalog = "MyBulltin";
strB.UserID = "sa";
strB.Password = "123";
SqlConnection conn = new SqlConnection(strB.ToString());
SqlCommand comm = null;
string sql = "insert into Bulletin(id,content,date,title) values(@id,@content,@date,@title)";
comm = new SqlCommand(sql, conn);
conn.Open();
for (int i = 0; i < 100000; i++)
{
SqlParameter[] param=new SqlParameter[]{
new SqlParameter("@id",i+10000),
new SqlParameter("@content","18:00Ö±²¥ÑǹÚÊ׶ûVSɽ¶«£¬¾´ÇëÆÚ´ý£¡£¡£¡"),
new SqlParameter("@date",DateTime.Now),
new SqlParameter("@title","18:00Ö±²¥ÑǹÚÊ׶ûVSɽ¶«")
};
comm.CommandText = sql;
comm.Parameters.AddRange(param);
comm.ExecuteNonQuery();
comm.CommandText = string.Empty;
comm.Parameters.Clear


Ïà¹ØÎĵµ£º

SQL ServerµÄ ÅÅÐò¹æÔò(collation)³åÍ»ºÍ½â¾ö·½°¸

ʲôÊÇÅÅÐò¹æÔò£¨collation£©
¹ØÓÚSQL ServerµÄÅÅÐò¹æÔò£¬¹À¼Æ´ó¼Ò¶¼²»Ä°Éú£¬ÔÚ´´½¨Êý¾Ý¿âʱÎÒÃǾ­³£ÒªÑ¡ÔñÒ»ÖÖÅÅÐò¹æÔò£¨conllation£©£¬Ò»°ãÎÒÃÇ»áÁôÒ⵽ÿһÖÖÓïÑÔµÄÅÅÐò¹æÔò¶¼ÓÐÐí¶àÖÖ£¬±ÈÈç±ê×¼´ó½¼òÌåÖÐÎÄChinese_PRCµÄÅÅÐò¹æÔò¾ÍÓÐÊýÊ®ÖÖÖ®¶à

ÕâЩÅÅÐò¹æÔòÓÐʲô×÷ÓÃÄØ£¿ÈÃÎÒÃÇÏÈÀ´¿´¿´MS¹Ù·½µÄ½âÊÍ£º
ÅÅÐò¹æÔ ......

t sql ¶Á³öÿ×éµÄÇ°n¸ö

http://topic.csdn.net/u/20100113/17/b52a1ef4-54a8-4333-8119-a161869c1eef.html
---------------------------------
--  Author: liangCK СÁº
--  Title : ²éÿ¸ö·Ö×éÇ°NÌõ¼Ç¼
--  Date  : 2008-11-13 17:19:23
---------------------------------
--> Éú³É²âÊÔÊý¾Ý: #T
IF OBJECT_ID(' ......

SQL Server2005 ±í·ÖÇø

---1¡¢Ìí¼ÓÊý¾ÝÎļþ
use master
go
--Fam200901
alter database RedfDB
add filegroup FGAM200901
go
alter database RedfDB
add file(name='FGAM200901',filename='D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Fam200901.mdf',
      size=20,maxsize=40,filegrowth=10% ......

¸ßÖÊÁ¿ ¸ßÐÔÄܵÄSQLÓï·¨

ÔÚÓ¦ÓÃϵͳ¿ª·¢³õÆÚ£¬ÓÉÓÚ¿ª·¢Êý¾Ý¿âÊý¾Ý±È½ÏÉÙ£¬¶ÔÓÚ²éѯSQLÓï¾ä£¬¸´ÔÓÊÓͼµÄµÄ±àдµÈÌå»á²»³öSQLÓï¾ä¸÷ÖÖд·¨µÄÐÔÄÜÓÅÁÓ£¬µ«ÊÇÈç¹û½«Ó¦ÓÃϵͳÌύʵ¼ÊÓ¦Óúó£¬Ëæ×ÅÊý¾Ý¿âÖÐÊý¾ÝµÄÔö¼Ó£¬ÏµÍ³µÄÏìÓ¦ËٶȾͳÉΪĿǰϵͳÐèÒª½â¾öµÄ×îÖ÷ÒªµÄÎÊÌâÖ®Ò»¡£ÏµÍ³ÓÅ»¯ÖÐÒ»¸öºÜÖØÒªµÄ·½Ãæ¾ÍÊÇSQLÓï¾äµÄÓÅ»¯¡£¶ÔÓÚº£Á¿Êý¾Ý£¬ÁÓÖÊSQLÓï¾ä ......

´«ÖDz¥¿Íjavaѧϰ sql¼òµ¥²éѯÓï¾ä

½ñÌìÎÒѧϰÁËsqlµÄ¼òµ¥²éѯÓï¾ä£¬
 
һЩ»ù±¾µÄ¸ÅÄ
1                  ϵͳȨÏÞ£ºÊý¾Ý¿âÖеĶÔÏó£¬ ±í£¬´´½¨±í£¬É¾³ý±í
2           ¶ÔÏóȨÏÞ£º¶ÔÊý¾ÝµÄÔö¡¢É¾¡¢¸Ä¡¢²é¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ