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

ÇósqlÎÄ

ÇóA != 1 and B != 2 ÒÔÍâµÄ¼Ç¼
a!=1 and b!=2 ÒÔÍ⣿

ÄÇÆñ²»ÊÇa=1»òÕßb=2µÄÕâÖÖÇé¿öô

select * from table where a = 1 or b = 2

Èç¹ûÊÇA != 1 and B != 2µÄ»°
select * from table where a <> 1 and b <> 2

where not(A!=1 and B!=2)

ÒýÓÃ
Èç¹ûÊÇA != 1 and B != 2µÄ»°
select * from table where a <> 1 and b <> 2


ÕâÑù×ÓOK!

¸÷λ£º
  Çë¿´ºÃÁË£¬ÊÇA £¡= 1 ͬʱ B!= 2 ÒÔÍâµÄÇé¿ö

A £¡= 1 and B!= 2
ËüµÄ·´Òå¾ÍÊÇ£º
A = 1 or B = 2

ÒýÓÃ
¸÷λ£º
  Çë¿´ºÃÁË£¬ÊÇA £¡= 1 ͬʱ B!= 2 ÒÔÍâµÄÇé¿ö

ÄãµÄÃèÊö´æÔÚÆçÒå
Èç¹ûÊÇ¡°ÇóA != 1¡± and¡° B != 2 ÒÔÍâµÄ¼Ç¼¡±
Ìõ¼þ¾Íд
where a!=1 and not(b!=2)
µ±È»ÄãÒ²¿ÉÒÔд³Éwhere a!=1 and b=2
Äã¸ù¾ÝÐèÒªÐÞ¸ÄÏÂ

A £¡= 1 ͬʱ B!= 2 ÒÔÍâµÄÇé¿ö

Çé¿ö1£º
£¨A £¡= 1 ͬʱ B!= 2£©ÒÔÍâµÄÇé¿ö£¬Ôò
a = 1 or b = 2 or a is null or b is null;

Çé¿ö2£º
A £¡= 1 ͬʱ £¨B!= 2ÒÔÍ⣩µÄÇé¿ö£¬Ôò
a != 1 and (b = 2 or b is null);

ÀëÉ¢ÊýѧÊéÉÏÓС£

ÒýÓÃ
¸÷λ£º
  Çë¿´ºÃÁË£¬ÊÇA £¡= 1 ͬʱ B!= 2 ÒÔÍâµÄÇé¿ö



Ïà¹ØÎÊ´ð£º

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

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

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

sql ÎÊÌâ

DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)

string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+"') and (EndTime ......

csvÎļþת»»³Ésqlµ¼Èëµ½Êý¾Ý¿â£¬Ã»ÓÐÊý¾ÝΪºÎ£¿

Ö´ÐеÄ˳Ðò£º
1£©Îļþä¯ÀÀ¿ò£¨Ñ¡ÔñÎļþʹÓã©
Ñ¡ÔñºÃÎļþºó
µã»÷Ò»¸öµ¼Èë°´Å¥µÄʱºò £¬°ÑÉÏÃæÉÏ´«¿òÀïµÄcsvÎļþÒÔÒ»¸öIDΪÎļþÃû£¬ÉÏ´«µ½**/**Îļþ¼ÐÏÂ
2£©¶ÁÈ¡Õâ¸öÎļþ¼ÐϵÄcsvµÄÎļþ£¬×ª»»³Ésql
3 ......

ÇósqlÓï¾ä

pln_id netnode_id
1          2
2          3
1          3
2          4

ÎÒ Ïë° ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ