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

sqliteµÄsqlÓï¾äÎÊÌâ

sqlite²»»á²»Ö§³Öand °É?
select * from table where rootid=2 and uid=0 order by orderid asc,id asc
ʹÓÃÉÏÃæµÄÓï¾ä²éѯ²»µ½Êý¾Ý,¿ÉÊÇ·ûºÏµÄÌõ¼þÊÇ´æÔÚµÄ.ÎÒÈ¡µôand,¾ÍÓмǼ,²»ÖªµÀÔõô»ØÊÂ
select * from table where rootid=2 order by orderid asc,id asc

ÊÔÒ»ÏÂselect * from table where uid=0;

ÒýÓÃ
ÊÔÒ»ÏÂselect * from table where uid=0;


ÕâÑùÊÇ¿ÉÒÔµÄ,¿ÉÊǺóÃæ¼ÓÉÏÁíÒ»¸öÌõ¼þ,ÎÒÊÔ¹ýÁË,and roorid=1¿ÉÒԲ鵽,¿ÉÊÇand roorid=2¾Í²é²»µ½ÁË,µ«ÎÒ¿´Êý¾Ý¿â,·ûºÏÌõ¼þµÄ,Óа¡

³öÏÖÕâÖÖÇé¿ö?ÎÒ²ÂÓ¦¸ÃÊÇÄãµÄÊý¾Ý¿âÓÐÎÊÌâÁË,ÖØÐÂÏÂÔØÒ»¸ö°²×°°É!

ÎÒ¸Õ²ÅɾÁËÈ«²¿Êý¾Ý,´ÓмÓÁËÁ½Ìõ,ÊÔÁËÏÂselect * from table where uid=0;ÕâÌõ,²»ÐÐ,²é²»µ½,²»ÖªµÀʲôԭÒò,uidÊÇÊý×é×Ö¶Î,ÎÒÒª²éѯµÈÓÚ0µÄ,ÄѵÀ²»ÊÇÕâÑùÂð?

"Êý×é×Ö¶Î"ʲôÒâ˼?

¼ÈÈ»
uid=0
ûÓнá¹û
ÄÇô
rootid=2 and uid=0
¾Í¸ü²»»áÓнá¹ûÁË¡£

ÎÒµÄÒâ˼ÊÇ,uid=0µÄÊý¾ÝÊÇ´æÔÚµÄ,µ«ÊDzéѯ²»µ½.

½¨ÒéÖØ×° ¿Ï¶¨ÊÇÄÄĬÈϵÄÅäÖÃÎÊÌâ³ö´í³åÍ»ÁË


Ïà¹ØÎÊ´ð£º

ÇóSQL£¿

´ó¼ÒºÃ£¬ÇëÎÊÔÚ±íMÖÐÓÐ×ֶΣºa b c d e 
ÎÒÏë²é³öÆäÖÐÂú×ãÏÂÃæÈÎÒâÒ»ÏîµÄÊý¾Ý£¬1.×Ö¶Îa µÄÖµ²»ÊÇ ¡®Êé»ò±Ê»ò±¾¡¯ÖÐÈÎÒ»£¬2.aΪÊéµÄʱºò×Ö¶Îb,cÊÇ¿Õ;3.µ±aֵΪ±ÊµÄʱºòdÊÇ¿Õ;4.µ±aΪ±¾µÄʱºòb,d,e¶¼ÊÇ¿Õ;5.È ......

pl/sqlµ¼ÈëÊý¾ÝÎÊÌâ

ÎÒEXCELÖÐÒ»¸öµ¥Ôª¸ñµÄÊý¾ÝÈç  "2009-01","8949-232"

½«Õâ¸öÊý¾ÝÕ³Ìùµ½PL/SQLÖеÄÒ»¸ö±íÖкó,Êý¾ÝÈ·ÊdzÉΪÁË 2009-01,8949-232 ,°ÑËùÓеÄ""¶¼Ã»ÁË,
ÈçºÎŪÄØ?Çë´ó¼ÒÊÔ ......

sql ²éѯ

  ÎÒÓÐÒ»¸öÔºÍÈÕ×é³ÉµÄÊý×Ö£¬ÓÐÁ½×éÔºÍÈÕ
ÏëÔÚÉí·ÝÖ¤ºÅÖÐÌôÑ¡³öÔڸøÃÁ½×éÔÂÈÕÖ®¼ä³öÉúµÄÈË£¬²»ÖªµÀÓ¦¸ÃÔõôд.
Éí·ÝÖ¤ºÅÓпÉÄÜÊÇ15λ»òÕß18λ

ÔÂÈÕ×éºÏµÄÐÎʽÈçÏÂ
10-17/04-20
ÔÂ-ÈÕ/ÔÂ- ......

Çósql²éѯÓï¾ä


t_a{
id ,
name,
age,
pid,  ¶ÔÓ¦t_b(id)

}

t_b{
id£¬
ywlx£¬
}

±¾ÈËÏëÓÃ
  ÕâÖÖÀàÐ͵IJéѯ
    String sql = "select name,age,y ......

Sql È¡Êý¾ÝÎÊÌâ

declare @test table(
title varchar(100),--±êÌâ
num decimal(18,6), --ÊýÁ¿
unitqty decimal(18,6) --µ¥Î»
)
insert into @test values('a',100,50)
insert into @test values('b&# ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ