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

sql ÓαêµÄʹÓÃ

Ò»¸öÀý×Ó£º´Ótszl±íÖвé³öÊý¾Ý£¬¸ù¾Ýcs×ֶεÄÖµ¾ö¶¨ÍùBOOK_SERIAL±íÖвåÈ뼸ÐÐÊý¾Ý¡£
declare @num int
declare @id varchar(60)
declare @classbm varchar(60)
set @classBm='101'
declare id cursor for select id,cs from  [tszl]
open id
fetch next from id into @id,@num
while @@fetch_status!=-1
 begin
    while(@num>0)
      begin
  set @num = @num-1
 INSERT INTO  [BOOK_SERIAL]
           ([id]
           ,[classBm]
           ,[state])
  values(@id,@classBm,'0')
      end
fetch next from id into @id,@num
   end
close id


Ïà¹ØÎĵµ£º

DB2 SQLÐÔÄÜÓÅ»¯Ïà¹ØµÄ10´óÒªËØ

ÏÂÃæÌá³öÁË10ÌõºÍDB2 SQLÐÔÄÜÏà¹ØµÄ10ÌõÒòËØ£º
1¡¢ÌṩÊʵ±µÄͳ¼ÆÐÅÏ¢
¶ÔDB2ÓÅ»¯¹ÜÀíÆ÷£¨otimizer£©¶øÑÔ£¬ÈçºÎ¸ü¼ÓÓÐЧµÄÖ´ÐÐSQLÓï¾äÊÇÓÉ´æÔÚÓÚDB2 catalogÖеÄͳ¼ÆÐÅÏ¢¾ö¶¨µÄ£¬ÓÅ»¯Æ÷ÀûÓÃÕâЩÐÅÏ¢¾ö¶¨×îÓÅ»¯µÄ·¾¶¡£
Òò´Ë£¬ÎªÁ˱£³ÖϵͳÄܹ»×ö³ö×î¼ÑÑ¡Ôñ£¬ÐèÒª¾­³£µÄÔËÐÐRunstatsÃüÁÀ´±£³Öϵͳͳ¼ÆÐÅÏ¢µÄ¼°Ê±ÓÐЧ¡£ ......

Sqlʱ¼ä¸ñʽ»¯·½·¨(ת)


Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
Select
CONVERT(varchar(100), GETDATE(), 1): 05/16/06
Select CONVERT(varchar(100),
GETDATE(), 2): 06.05.16
Select CONVERT(varchar(100), GETDATE(), 3):
16/05/06
Select CONVERT(varchar(100), GETDATE(), 4): 16.05.06
Select
CON ......

SQL µ¼³öµ½ Ö¸¶¨ACCESS±í ÍêÃÀ·½°¸

ÓÉÓÚ³ÌÐòÐèÒª°ÑSQL SERVER ÀïµÄÊý¾Ýµ¼Èëµ½ACCESSÀï.
¸Õ¿ªÊ¼Ê¹ÓÃDataSetÀ´Ñ­»·.
Êý¾ÝÁ¿ÉÙµÄʱºò»¹Ëã¿ÉÒÔÓ¦¸¶µÄ¹ýÀ´.
µ«µ±Êý¾Ý¶àµÄʱºò.
»á±¨´í"λÖôíÎó"
ÔÚÍøÉÏËÑÑ°Ò»·¬.ÕÒµ½Ò»¸ö·½·¨.
ʹÓÃinsert into openrowset
½Ó×Å´íÎóÒ»¸ö½ÓÒ»¸öµÄÀ´..
"²åÈë´íÎó: ÁÐÃû»òËùÌṩֵµÄÊýÄ¿Óë±í¶¨Ò岻ƥÅä¡£"
"δÄÜÕÒµ½ OLE DB Ì ......

Èí¼þϵͳÐÔÄÜÓÅ»¯²ßÂÔSQLÓÅ»¯

    ¶øÕâһƪÖУ¬ÎÒÃǾÍΧÈÆSQLÓÅ»¯À´¿ªÊ¼Õâ´Î½²½â£¬ÎªÊ²Ã´µÚÒ»½²ÒªËµSQLÓÅ»¯£¿ÒòΪÎÒÈÏΪÕâÊdzÌÐòÔ±µÄ»ù±¾¹¦£¬¶øÇÒÒ²ÊÇÎÒÃDZØÐëҪȥÕÆÎյģ¬ËäÈ»ÄãдµÄ SQLÓï¾äÄÜÍê³ÉÏàÓ¦µÄ¹¦ÄÜ£¬µ«ÊÇÄãÊÇ·ñ¿¼ÂǹýÕâЩÓï¾äÅöµ½º£Á¿Êý¾Ý»òÕß±©Á¦·ÃÎÊʱ»á²»»á´øÀ´Ð§ÂʵĴó·ù¶ÈµÄ¼õÂý£¿Ò²ÐíºÜ¶à³ÌÐòÔ±ºÍÎÒÒ»ÑùÔÚÅöµ½ÏµÍ³ÏìÓ¦Ê ......

²âÊÔÈËÔ±ÒªÕÆÎյĻù±¾µÄSQLÓï¾ä(ÉÏ)

²âÊÔÈËÔ±ÒªÕÆÎյĻù±¾µÄSQLÓï¾ä(ÉÏ)
 
 
 
 
                                        ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ