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

sql server°²×°°æ±¾²é¿´


SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
productversion£º²úÆ·°æ±¾£¨ÀýÈ磬10.0.1600.22£©
productlevel£º²úÆ·¼¶±ð£¨ÀýÈ磬RTM£©
edition£º°æ±¾£¨ÀýÈ磬 Enterprise£¨ÆóÒµ°æ£©¡¢Developer Edition£¨¿ª·¢°æ£©£©
SELECT @@VERSION
΢Èí¾ßÌå˵Ã÷£º
http://support.microsoft.com/kb/321185


Ïà¹ØÎĵµ£º

20100513.NETµ÷ÓÃSQL SERVER´æ´¢¹ý³Ì

¼¸¸ö´æ´¢¹ý³Ì£¬ºÜ¼òµ¥µÄ£¬µ«ÊÇÎÒ´ÓÀ´Ã»ÓÐѧϰ¹ý£¬ºÇºÇ£¬Õâ¸öÕýÊÇÎÒÒªÀ´ÅàѵµÄÄ¿µÄ
-- =============================================
-- Author:  
-- Create date: 2010Äê05ÔÂ12ÈÕ
-- Description: ´Ë¹ý³ÌÓÃÓÚ²éѯËùÓÐÓû§Ãû¼°ÃÜÂë
-- =============================================
CREATE PROCED ......

SQLÐÐתÁдúÂë

1. SQLÐÐתÁдúÂë
-
-
±íÀïÃæÓÐÕâôһ×éÊý¾Ý:
code                price
'MCU0-3'       15
'MCU0-3'       20
'MCU0-3'       22
'MCU ......

SQL ×¢Èë




SQL×¢Èë¾Í²»ÓýéÉÜÁË£¬ÍøÉϺܶࡣÏÂÃæ½éÉÜһϷÀÖ¹
SQL×¢ÈëµÄ·½·¨¡£
ʹÓÃ
quotename º¯ÊýºÍ
sp_executesql
²Î¿¼Èç
ϱí½á¹¹£ºÕâÊÇÒ»¸öÎĵµ±íÀïÃæÓÐһЩ¼òµ¥µÄ×Ö¶ÎÐÅÏ¢
CREATE
TABLE
[dbo]
.
[DocumentInfo]
(
    [ID]
[int]
IDENTITY
(
1,
1) primary key
 NOT
......

¾­µäSQLÓï¾ä´óÈ«

Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'
--- ¿ªÊ¼ ±¸·Ý
BACKUP DATABASE pubs TO testBack
4¡¢Ë ......

¹ØÓÚDB2 sql:0206n ´íÎó

½ñÌìÅöµ½Ò»¸ösql:0206nµÄ´íÎó£¬ÎÒʹÓÃselect * from xxx¿ÉÒԲ鿴±í½á¹¹ºÍÄÚÈÝ£¬È»¶øµ±ÎÒʹÓÃselect aaa from xxxµÄʱºòÈ´¸øÎÒ±¨´í£¬×îºóÅŲéÔ­ÒòÊÇÎÒʹÓù¤¾ß½¨±í£¬½¨±íÓï¾äÊÇÀàËÆÕâÑùµÄ£ºcreate table("id" int,"name" varchar)£¬ºÃÁ˽á¹û¾ÍÊÇ×ֶθø¼ÓÁËÒýºÅ£¬ÔÚ²éѯµÄʱºòʹÓÃ*¿ÉÒÔ²éѯ£¬Ê¹Óõ¥¸ö×ֶβ»Äܲéѯ£¬ÎÒ¹À¼Æ¾ÍÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ