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

sqlÈ¡²éѯֵ

ÈçÌ⣺select name from table1
µÃµ½½á¹û£ºname
          СÍõ
          СÕÔ
          СÀî
          СÖÜ
ÏëÒª½á¹û£º
°Ñ²éѯµ½µÄ½á¹û¸³Öµ¸ø@SQL
Ô­Ö°£º@sql='admin'
ÏëÒª½á¹û£º@sql=@sql+',СÍõ£¬Ð¡ÕÔ£¬Ð¡ÀСÖÜ'
×¢£º¾¡Á¿²»Òªdo..whileÑ­»·
ÔÚÏߵȣ¬Óв»¶®µØ·½Çë˵£¡


¶¥¶¥

declare @sql varchar(500)
select @sql='admin'
select @sql=@sql+','+name from table1
print @sql
ÎÊÌâ»ù±¾½â¾ö£¬¿ÉÊÇ [tabel]±íÊDZäÁ¿£¬²»È·¶¨
¸ÃÈçºÎ

ÒýÓÃ
declare @sql varchar(500)
select @sql='admin'
select @sql=@sql+','+name from table1
print @sql
ÎÊÌâ»ù±¾½â¾ö£¬¿ÉÊÇ [tabel]±íÊDZäÁ¿£¬²»È·¶¨
¸ÃÈçºÎ


SQL code:
declare @table1 nvarchar(50)
set @table1 = '****'
...
exec 'select @sql = @sql + '',''+ name from @table1'
...


ѧϰ

ÒýÓÃ
declare @sql varchar(500)
select @sql='admin'
select @sql=@sql+','+name from table1
print @sql
ÎÊÌâ»ù±¾½â¾ö£¬¿ÉÊÇ [tabel]±íÊDZäÁ¿£¬²»È·¶¨
¸ÃÈçºÎ

ÄǾÍÏñÎÒÃÇÒ»°ãº¯ÊýÑùµÄ


Ïà¹ØÎÊ´ð£º

Á½¸öµ¼¹¹sql serverÊý¾Ý¿â,Êý¾Ýµ¼Èëµ¼³öÎÊÌâ

ÏÖÔÚÓÐÁ½¸öÒì¹¹µÄsql serverÊý¾Ý¿â,ÎÒÏ뽫µÚÒ»¸ö±íÖеÄÊý¾Ýµ¼Èëµ½µÚ¶þ¸ö±íÖÐ,×Ô¼ºÖ¸¶¨µ¼ÈëÊý¾ÝµÄ×Ö¶Î,ÈçºÎµ¼ÈëÊý¾ÝÄØ,´ó¼ÒÌÖÂÛÒ»ÏÂ?
dts¹¤¾ß

µ¼Èëµ¼³ö¹¤¾ß.

DD

¹þ¹þ£¬¹À¼ÆÕâλÊǵØQIOU¶¼Êܲ»Á˵Ä

Ö±½ÓÐ ......

delphiÖÐexcelµ¼Èësql serverµÄÎÊÌâ¡£

'Select * into mytable from OpenDataSource(''Microsoft.JET.OLEDB.4.0'',''Data Source=f:\test.xls;Mode=Read;Extended Properties=Excel 5.0;Persist Security Info=False' ......

access Êý¾Ý¿â SQLÓï¾äÔõôÑùËæ»úÑ¡ÔñÊý¾Ý£¿£¿

³ÌÐòʱASP+access

sql="select top 2 id,username from comp    order by rnd(id)  "

ÉÏÃæÓï¾äˢкó¶¼ÊÇÒ»¸öÖµ ÕâÑù»¹ÓÐËæ»úµÄÒâÒåÂð

ACCESSÓÐË¢ÐÂËæ»úÑ¡ÔñµÄSQLÓ ......

SQL Óï¾ä¡£¡£ Çë½Ì¸ßÊÖ

ÏÈÀ´Ò»¸ö´íÎóÓï¾ä¡£¡£
select * from [aa] where a1 in (select max(a2),a1 from [aa]  group by a1 )


ÎÒ´óÌåÒâ˼£¬
¶Áȡһ¸öͳ¼ÆÏµÍ³ÖÐ ²»Öظ´µÄ IP °´ÕÕ ×îºóʱ¼äÅÅÐò£¬²¢ÏÔʾ³öËùÓÐ×ֶΡ£¡ ......

sql server 2008 sql serverÉí·ÝÑéÖ¤ÎÊÌâ

ÎÒϵͳʽwin7 £¬Êý¾Ý¿âsqlserver2008.Ò»Ö±ÓÃwindowsÑéÖ¤£¬µÇ½£¬²»ÄÜÓÃsqlÑéÖ¤£¬ÔÚsaÉÏÖØÐÂ×¢²áÒ»¸öÓû§µÄ»°£¬µÇ½ʱµÚÒ»±é±¨
Òѳɹ¦Óë·þÎñÆ÷½¨Á¢Á¬½Ó£¬µ«ÊÇÔڵǼ¹ý³ÌÖз¢Éú´íÈ¡¡££¨provider:¹²ÏíÄÚ´æÌṩ³ÌÐò£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ