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

mssqlµÄ¶à±í¹ØÁªÎÊÌâ - MS-SQL Server / »ù´¡Àà

a±íuid¡¢fidºÍb±íÖеÄid¹ØÁª£¬
ÈçºÎ²éѯa.uidºÍa.fid¶ÔÓ¦b±íÖеÄÏàÓ¦×ֶΡ£
SQL code:
select a.uid,a.fid,b.* from a,b where a.uid=b.id and a.fid=b.id


ÄãÊÇ˵b.idÊÇÓÉa.uid ºÍa.fid×é³ÉµÄ£¿
ÒªÊǵĻ°£¬
b.id = a.uid + a.fid 
ÕâÑùÐв»

ÓеãÃÔºý

ÒýÓÃ
a±íuid¡¢fidºÍb±íÖеÄid¹ØÁª£¬
ÈçºÎ²éѯa.uidºÍa.fid¶ÔÓ¦b±íÖеÄÏàÓ¦×ֶΡ£

¾ßÌåÔõôÏÔʾ

select b.* from(
select uid as id from a union all
select fid from a) t join b on t.id=b.id

ÒýÓÃ
SQL code
select a.uid,a.fid,b.* from a,b where a.uid=b.id and a.fid=b.id

a.uidºÍa.fid¶ÔÓ¦ÔÚb.idÖеÄ×ֶΣ¬
¾Í±ÈÈç˵uidÊÇÖ¸Óû§µÄid,fidÊÇÖ¸Óû§µÄÅóÓÑid
ÎÒÏë²é³öÀ´Óû§µÄÐÕÃûºÍÓû§ÅóÓѵÄÐÕÃû£¬ÕâÑù²î¿Ï¶¨ÊDz»ÐеÄ

°Ñ±íµÄ½á¹¹£¬²âÊÔÊý¾Ý ¼°ÄãÒªµÄ½á¹û

¸æËßÎÒÃÇ°¡

a
±í
id uid fid
1 1 2
2 3 5
b
id name
1 uid1
2 uid2
3 uid3
4 uid4
5 uid5
ÎÒÏëÒªµÃµ½
a.id = 1 ¶ÔÓ¦µÄuidµÄnameºÍfid¶ÔÓ¦µÄname
id uname fname
1 uid1 uid2
2 uid3 uid5

SQL code:

create table ta (id int,uid int,fid int)
insert into ta
select 1, 1, 2 u


Ïà¹ØÎÊ´ð£º

ÇóÒ»¸öSQLÓï¾ä - MS-SQL Server / »ù´¡Àà

×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......

¹ØÓÚSqlµÄÎÊÌâ - .NET¼¼Êõ / ASP.NET

½«Ò»¸ö²éѯÓï¾ä¸³¸øÒ»¸ö±äÁ¿£¬ÈçÏ£º
DECLARE @STR NVARCHAR(MAX)
SET @STR='SELECT * from SALE_PROD'
ÔõôÑù²ÅÄÜÖ´ÐÐËüÄØ£¿
Çë¸ßÊÖ£¬ÈÊÐÖ£¬ÏÀ½ã°ï°ïæ°¡


¶àл£¬¿ÉÒÔÀ²£¬¸ßÊÖ°¡

Ö±½ÓÖ´ÐоÍÐÐÁË

exec ......

Ôõô°ÑMDFÊý¾Ýתµ½MySQL£¿ - MS-SQL Server / »ù´¡Àà

Ôõô°ÑMDFÊý¾Ýתµ½MySQL£¿
ÖÁÉٵø½¼Óµ½sqlserverÉÏ

¾ßÌåÔõôŪ°¡ ÎҵıÏÒµÉè¼ÆµÄÊý¾Ý¿âÊÇ´ÓÍøÉÏdownÏÂÀ´µÄ£¿£¿

Ä㻹²»ÈçÖ±½ÓÓÃsqlserverÄØ

º¯Êý¡¢´æ´¢¹ý³Ì¶¼µÃ¸ÄÁË¡£

sqlserverûÔõôÓùý¡£Ò²Ã»Óа²× ......

asp wap sqlÓï¾äÖлñÈ¡µÄºº×Ö²»ºÃÊ - Web ¿ª·¢ / ASP

SQL code:

rs.open "select * from guide where city_name='±±¾©' order by pai desc",conn,1,1
do while not rs.eof or rs.bof
¡£¡£
¡£¡£
¡£¡£
rs.movenext
loop
Õâ¸ösqlÓï¾äÔÚwapÕ¾Àï ±¾ÉíÓÐ ......

C# SQL µÄUPDATETEXT ÎÊÌâ - .NET¼¼Êõ / C#

A±í ÓÐÁ½¸ö×ֶΠ
  id ΨһÊý×ÖÓò
  InfoTxt text ÀàÐÍ
 ÎÒÏÖÔÚÒª°Ñ id ²»ÊÇ14 µÄËùÓÐ InfoTxt×ֶΠÎı¾ºóÃæ ¶¼¼ÓÉÏ 'aaa' 
°´ÏÂÃæÖ´ÐÐÏÂÀ´ Ö»Óбí×îºóÒ»ÐмÓÉÏÁË 'aaa' ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ