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

³£ÓõÄSQLÓï¾ä×ܽá

 ÏÖÔÚ·¢ÏÖSQLÓï¾äȷʵÊÇÌ«Ç¿´óÁË£¬ÒÔºóÓöµ½ÎÊÌâÒª¾¡Á¿ÏȺúÃ˼¿¼Ï£¬²»Òª°´ÕÕ×µÄ·½·¨À´×ö£¡
1.´ÓtblFaultDetailTemp±íÖУ¬ÕÒµ½ID=14µÄÏ²¢½«ËùÁгöµÄËĸö×ֶεÄÖµ¿½±´µ½tblFaultDetail±íÖÐ
Insert into tblFaultDetail(Code,FileType,FaultCode,FaultRect) select Code,FileType,FaultCode,FaultRect from tblFaultDetailTemp where ID='14'
2.ÏÈ´ÓtblFaultImagesTemp±íÖÐÕÒ³öΨһµÄÏß·ºÅ£¬È»ºó´ÓtblLines±íÖУ¬ÕÒ³öÆäËù¶ÔÓ¦µÄÏß·Ãû³Æ×Ö¶Î
SELECT     LineName from         tblLines
WHERE     (LineCode IN
           (SELECT DISTINCT LineCode from  tblFaultImagesTemp))


Ïà¹ØÎĵµ£º

SQLÖÐÈçºÎÕýÈ·ÈÏʶ´¥·¢Æ÷

¶ÔÓÚ³õѧÕ߶Դ¥·¢Æ÷µÄÀí½âÍùÍù²»ÊǺÜ͸³¹£¬¼ÇµÃ×Ô¼ºµ±³õѧµÄʱºò×ÜÓеãÃþ²»ÇåÍ·ÄԵĸоõ£¬½ñÌì¾ÍÏëÆðºÍ´ó¼Ò×ܽáһϣ¬Èç¹ûÎÄÕ³öÏÖЩ覴ÃÇë¸ßÊÖ¶à¶àÖ¸½ÌŶ£¡
´¥·¢Æ÷ÊÇÊý¾Ý¿â·þÎñÆ÷Öз¢Éúʼþʱ×Ô¶¯Ö´ÐеÄÌØÊâ´æ´¢¹ý³Ì£¬Ëü²åÈ롢ɾ³ý»òÐÞ¸ÄÌرíÖеÄÊý¾Ýʱ´¥·¢Ö´ÐС£´¥·¢Æ÷ͨ³£¿ÉÒÔÇ¿ÖÆÖ´ÐÐÒ»¶¨µÄÒµÎñ¹æÔò£¬ÒÔ±£³ÖÊý¾ÝÍêÕûÐÔ ......

ms sql dateimeÖ®1905

 ÔÚ×ö“¶¼ÊмÒÔ°”ÓÅ»¯Ê±£¬¾ßÌåÊÇÓû§×¢²áʱ£¬Ìá½»ÐÅÏ¢£¬±¾À´BirthdayÊÇûÓÐдÈëÖµµÄ£¬´Ë×Ö¶ÎҲûÓÐĬÈÏÖµ£¬¿ÉÊý¾Ý¿âÖÐȴΪ“1905/3/14 0:00:00”£¬ÓôÃÆÖÁ¼«£¬ÉÏgoogle&baiduÒ²ÊÇûÓнâ¾öµÄ·½°¸¡£
Ö»ÄÜÕâÑùԭʼµÄ½â¾ö£º
Register ´æ´¢¹ý³Ì
   insert into UserInfo(UserID,sex) ......

´Ó sql server 2000 ÖÐÌáÈ¡×Ö¶Î˵Ã÷ÎÄ×Ö

´Ó sql server 2000 ÖÐÌáÈ¡×Ö¶Î˵Ã÷ÎÄ×Ö
SELECT
    [Table Name] = i_s.TABLE_NAME,
    [Column Name] = i_s.COLUMN_NAME,
    [Description] = s.value
from
    INFORMATION_SCHEMA.COLUMNS i_s
LEFT OUTER JOIN ......

SQL outputʹÓÃ

 Ò»Ö±Ã»ÓÐÕÒµ½Ò»Öֺõķ½·¨À´ÒýÓÃÓзµ»ØÖµµÄ´æ´¢¹ý³ÌµÄ·½·¨£¬Ê¹ÎÒÔÚÌí¼ÓÊý¾ÝÖÐ×ßÁ˲»ÉÙµÄÍä·£¬×î½ü£¬ÔÚ²éÔÄÁË´óÁ¿µÄ×ÊÁÏÖ®ºó£¬ÖÕÓÚÔÚ΢ÈíµÄÒ»¸öʵÀýÖÐÕÒµ½ÁËÒ»ÖÖÁ¼ºÃµÄ·½·¨¡£
Ê×ÏȱàдºÃÒ»Óзµ»ØÖµµÄ´æ´¢¹ý³Ì
create procedure proc_name
   @para1 nchar(20),    --ÊäÈë²ÎÊý
 &n ......

SQLÓï¾ä

 --Óï ¾ä ¹¦ ÄÜ
--Êý¾Ý²Ù×÷
SELECT --´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
INSERT --ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
DELETE --´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
UPDATE --¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå
CREATE TABLE --´´½¨Ò»¸öÊý¾Ý¿â±í
DROP TABLE --´ÓÊý¾Ý¿âÖÐɾ³ý±í
ALTER TABLE --ÐÞ¸ÄÊý¾Ý¿â±í½á¹¹
CREATE VIEW --´´½¨Ò»¸öÊÓÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ