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

SQL XML

--Creating xml Data Type Columns
CREATE TABLE dbo.Book
(BookID int IDENTITY(1,1) PRIMARY KEY,
ISBNNBR char(10) NOT NULL,
BookNM varchar(250) NOT NULL,
AuthorID int NOT NULL,
ChapterDESC XML NULL)
DECLARE @Book XML
SET @Book =
CAST('<Book name="SQL Server 2000 Fast Answers">
<Chapters>
<Chapter id="1"> Installation, Upgrades... </Chapter>
<Chapter id="2"> Configuring SQL Server </Chapter>
<Chapter id="3"> Creating and Configuring Databases </Chapter>
<Chapter id="4"> SQL Server Agent and SQL Logs </Chapter>
</Chapters>
</Book>' as XML)
CREATE PROCEDURE dbo.usp_INS_Book
@ISBNNBR char(10),
@BookNM varchar(250),
@AuthorID int,
@ChapterDESC xml
AS
INSERT dbo.Book
(ISBNNBR, BookNM, AuthorID, ChapterDESC)
VALUES (@ISBNNBR, @BookNM, @AuthorID, @ChapterDESC)
GO
--Inserting xml Data into a Column
INSERT dbo.Book
(ISBNNBR, BookNM, AuthorID, ChapterDESC)
VALUES ('570X000000',
'SQL Server 2005 T-SQL Recipes',
55,
CAST('<Book name="SQL Server 2005 T-SQL Recipes">
<Chapters>
<Chapter id="1"> SELECT </Chapter>
<Chapter id="2"> INSERT,UPDATE,DELETE </Chapter>
<Chapter id="3"> Transactions, Locking, Blocking, and Deadlocking </Chapter>
<Chapter id="4"> Tables </Chapter>
<Chapter id="5"> Indexes </Chapter>
<Chapter id="6"> Full-text search </Chapter>
</Chapters>
</Book>' as XML))
DECLARE @Book XML
SET @Book =
CAST('<Book name="SQL Server 2000 Fast Answers">
<Chapters>
<Chapter id="1"> Installation, Upgrades... </Chapter>
<Chapter id="2"> Configuring SQL Server </Chapter>
<Chapter id="3"> Creating and Configuring Databases </Chapter>
<Chapter id="4"> SQL Server Agent and SQL Logs </Chapter>
</Chapters>
</Book>' as XML)
INSERT dbo.Book
(ISBNNBR, BookNM, AuthorID, ChapterDESC)
VALUES ('1590591615',


Ïà¹ØÎĵµ£º

×ß½øLinq Linq to SQLÔ´´úÂëÉÍÎö

ÔÚDataContextÖÐÎÒÃÇ´ò½»µÀ×î¶àµÄÒ²Ðí¾ÍÊÇGetTable<TEntity>()·½·¨ÁË£¬Õâ¸ö·½·¨»á»ñȡһ¸öTable<TEntity>¶ÔÏ󣬽ñÌìÎÒÃǾÍÀ´¿´¿´Õâ¸ö¶ÔÏóÊÇÈçºÎ»ñÈ¡µÄ¡£
¡¡¡¡¶ÔÓÚ»ñÈ¡Table<TEntity>¶ÔÏóÎÒÃÇ»¹Òª¿´¿´Õâ¸öDataContextÊDz»ÊÇÇ¿ÀàÐ͵쬹ØÓÚÇ¿ÀàÐ͵ÄDataContext¿ÉÒÔ¿´ÎÒÇ°ÃæÒ»ÆªÎÄÕ£¬Ç¿ÀàÐ͵ÄDataContextÀ ......

SqlÊý¾Ý¿âÖØÃüÃû

1.²éѯ³öµ±Ç°Á¬½ÓÈ»ºó½«Æä¹Ø±Õ
select spid
from master.dbo.sysprocesses
where dbid= db_id('Êý¾Ý¿âÃû')
 --db_id('DoNet')
Èçspid ÖµÎª 52.
2. 執ÐÐ:   
 kill 52
3.ÐÞ¸Ä數據庫Ãû
EXEC sp_dboption 'old_db_name', 'Single User', 'false'
&nb ......

SQL Server2000ÖÐËÀËø¾­Ñé×ܽá

ËäÈ»²»ÄÜÍêÈ«±ÜÃâËÀËø£¬µ«¿ÉÒÔʹËÀËøµÄÊýÁ¿¼õÖÁ×îÉÙ¡£½«ËÀËø¼õÖÁ×îÉÙ¿ÉÒÔÔö¼ÓÊÂÎñµÄÍÌÍÂÁ¿²¢¼õÉÙϵͳ¿ªÏú£¬ÒòΪֻÓкÜÉÙµÄÊÂÎñ£º
»Ø¹ö£¬¶ø»Ø¹ö»áÈ¡ÏûÊÂÎñÖ´ÐеÄËùÓй¤×÷¡£
ÓÉÓÚËÀËøÊ±»Ø¹ö¶øÓÉÓ¦ÓóÌÐòÖØÐÂÌá½»¡£
ÏÂÁз½·¨ÓÐÖúÓÚ×î´óÏ޶ȵؽµµÍËÀËø£º
°´Í¬Ò»Ë³Ðò·ÃÎʶÔÏó¡£
±ÜÃâÊÂÎñÖеÄÓû§½»»¥¡£
±£³ÖÊÂÎñ¼ò¶Ì ......

[SQL Server2008]SQL Server ÖÐ.Óë::µÄÇø±ð(ת)

SQL ServerÖе÷Ó÷½·¨Ê±£¬¾­³£Óöµ½.»òÊÇ::Á½ÖÖµ÷Ó÷½·¨£¬ÆäÖÐ. ÊÇʵÀýµ÷Ó÷½·¨£¬::ÊǾ²Ì¬µ÷Ó÷½·¨¡£Èç¹û´ó¼Ò¶ÔC#Óï·¨ÊìϤµÄ»°£¬. ¶ÔÓ¦C#Öе÷ÓÃʵÀý·½·¨£¬:: ¶ÔÓ¦C#ÖеÄstatic·½·¨¡£
ÏÂÃæ¸ø³öÒ»¸öSQL ServerµÄʵÀý£¬ÏÂÃæµÄSQLÔËÐÐÔÚ2008»·¾³Ï£º
DECLARE @g geography;
SET @g = geography::Parse('LINESTRING(-122.360 ......

MySQL 5.5 m2 VS MS Sql Server 2000 SE BenchMark

×÷Õߣº°½Ê¿Î°
·þÎñÆ÷£ºIBM X346
CPU:Intel Xeon 3.0 *4
Äڴ棺2GB
Ó²ÅÌ£ºRAID5
OS£ºwin2003 SE
Ò»¡¢MySQL 5.5 M2
MySQL ĬÈÏÒýÇæInnoDB£¬ÓÅ»¯Ç°ºó¼¸ºõÎÞ²î±ð
¶þ¡¢SQL SERVER 2000 SE
     ´ÓÕâû´Î²âÊÔ¿´£¬MysqlÔÚÊÂÎñÐÔÄܱíÏÖ²»ÈçSQL SERVER¡£Í¬Ê±£¬Á½ÕßÔÚĬÈÏÇé¿ö£¬ÅúÁ¿Insert£¬Mysql±íÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ