SQL Server ÖÐASµÄÌØÊâÐÔ
ÍâÁ¬½ÓÈ¡Êý¾ÝÈç¹ûΪ¿Õ£¬²»´æÔÚASʱ¿ÉÄÜÈ¡µ½Êý¾Ý£¬µ«¼ÓÁËAS¾Í»á±¨´í¡£±ÈÈçSelect Top 10 a.*,b.Class AS ClassId
,b.DeviceName from AuxBusInfo a Left Join DeviceCandidate b On a.InitialDeviceRscId = b.DeviceRscId Order By AuxBusId£¬µ±
Ïà¹ØÎĵµ£º
Êý¾Ý´¦ÀíÊǵ±Ç°Êý¾Ý¿â³£¼ûµÄÓ¦Óá£Ò»Ð©Êý¾Ý¿â×é³ÉDATA mart´ÓÊý¾ÝÔ´Àï³éÈ¡¹ØÐĵıí½øÐоۺϣ¬½«½á¹ûÍÆË͵½Ëã·¨ÖнøÐд¦Àí£¬´Ó¶ø¸ßÐÔÄܵĻشðÓû§µÄ²éѯ¡£
×ÜËùÖÜÖª£¬LogÎļþÊǼǼÊý¾Ý¿â²Ù×÷µÄÎļþ£¬¶ÔÊý¾Ý¿âµÄÍêÕûÐÔ£¬Ò»ÖÂÐÔÓÐ×ÅÖØÒªµÄÒâÒå¡£×÷ΪÊý¾Ý´¦ÀíµÄÒ»¸ö³£¼ûºó¹ûÊÇLogÎļþµÄ³¬¼¶ÅÓ´ó¡£ËäÈ»½«Êý¾Ý¿âµÄ»Ö¸´Ä£Ê½ÉèÖó ......
½â¾ö·½·¨...
¹ØÓÚSQL°²×°±»¹ÒÆðµÄÐÞ¸´´ó¼Ò¿ÉÄܶ¼Óöµ½¹ýµ±SQL±»É¾³ýºóÐèÒªÖØа²×°Ê±£¬½øÈë°²×°½çÃæ¾Í»á³öÏÖSQL´íÎóÌáʾ£º
´ÓÇ°µÄ°²×°³ÌÐò²Ù×÷ʹ°²×°³ÌÐò²Ù×÷¹ÒÆð£¬ÐèÒªÖØÐÂÆô¶¯¼ÆËã»ú
È»¶øÕâЩ¶¼Êǰ׷Ѿ¢£¬²»¹ÜÄãÖØÐÂÆô¶¯¶àÉÙ´ÎÒ²¶¼ÎÞ¼ÃÓÚÊ£¬ÏÂÃæÎҾͽ²½²ÔõÑùÄܹ»½â³ý°²×°»òÉý¼¶Ê±Îļþ±»¹ÒÆðµÄ²Ù×÷¡£
µã»÷ ¿ ......
1. ˵Ã÷£º¸´ÖƱí(Ö»¸´Öƽṹ£¬Ô´±íÃû£ºa£¬Ð±íÃû£ºb)
SQL: select * into b from a where 1<>1;
2. ˵Ã÷£º¿½±´±í(¿½±´Êý¾Ý£¬Ô´±íÃû£ºa£¬Ä¿±ê±íÃû£ºb)
SQL: insert into b(a, b, c) select d, e, f from b;
3. ˵Ã÷£º ......
½«b±íÖÐcallerÁеÄÖµ²åÈëa±íÖÐcallÁÐÖС£
create table a
(
fid int,
call varchar(20),
age int
)
create table b
(
fid int,
caller varchar(20),
parentId int
)
select * from a
select * from b
insert into a values(1,null,19)
insert into a values(2,n ......
ALTER DATABASE AdventureWorks ADD FILEGROUP [2003Q3]
´´½¨Îļþ×éºó£¬Ê¹Óà ALTER DATABASE ½«ÎļþÌí¼Óµ½¸ÃÎļþ×éÖС£
ALTER DATABASE AdventureWorks
ADD FILE
(NAME = N'2003Q3',
FILENAME = N'C:\AdventureWorks\2003Q3.ndf',
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB)
TO FILEGR ......