ÏÖÓбí Term
½á¹¹ÈçÏÂ
time1 time2 idterm
2009-2-15 2009-6-30 11
2009-9-10 2010-1-15 12
Èç¹ûÊäÈë 2009-4-25 ÔòÓ¦¸ÃÈ¡³öidterm 11
Èç¹ûÊäÈë 2009-12-5 ÔòÓ¦¸ÃÈ¡³öidterm 12
Õâ¸öSQL¸ÃÔõôд£¿
·ÖÉÙÇë¼ûÁÂ
SQL code:
select idterm from tb
where time1<=ÊäÈë ......
StringBuffer str = new StringBuffer("select * from menu where parentid=1 and mid <>1 order by parentid");
List list = new ArrayList();
ResultSet rst = null;
DataBaseConnection dbc = null;
PreparedStatement pstm = null;
try {
dbc = new DataBa ......
ÔõôʹÎÒÿ´Î²»ÊǸüÐÂÊý¾Ý¿â
¶øÊǸ²¸ÇÉϴεÄËùÓмǼÄØ£¡
ÒòΪÓÐʱºòʱ¼äÌõ¼þ²»Í¬
SQL code:
select * from hwouttb where
CAST(REPLACE(REPLACE(REPLACE(outdate,'Äê','-' ),'ÔÂ','-'),'ÈÕ','') AS DATETIME)
between
CAST(REPLACE(REPLACE(REPLACE('2007Äê10ÔÂ25ÈÕ','Äê','-' ),'ÔÂ','-'),'ÈÕ','') AS ......
û¸É¹ýÕâÊ£¬Ò²²»ÖªµÀoracleÊý¾Ý¿âɶÑù£¬Çë½Ì´óϺÃǾßÌå²½ÖèÊÇʲô£¿ÐèҪעÒâЩʲô£¿
ÊÇÕû¸ö¿âµÄÊý¾Ý»¹ÊÇ±íµ¥?
Õæ¸öÊý¾Ý¿â
Õû¸öÊý¾Ý¿â£¬ÁíÍâÎÒÊÇ´Óһ̨װÓÐoracleµÄµçÄÔµ¼Èëµ½Áíһ̨װÓÐsql serverµÄµçÄÔÖС£¶àл£¡
ÒýÓÃ
ÊÇÕû¸ö¿âµÄÊý¾Ý»¹ÊÇ±íµ¥?
¸ÕgoogleÁËÏ£¬Ò²Ã»ÕÒµ½oracle µ¼ÈëSQL serverµÄ· ......
ÓÐÈý¸ö±íÒ»¸öÊDzɹºµ¥¸ñʽÈçÏÂ
Èë¿âµ¥±í£º
Èë¿âµ¥ºÅ ²úÆ· Öʼì±àºÅ Èë¿âÊýÁ¿
001 Æ·ÖÖ1 Zj001 10
002 Æ·Ö ......
ÓÐÁ½¸ö±í¡£·Ö±ð¶¼ÓÐIDÖ÷¼ü¡£A±íµÄIDºÍB±íµÄIDÊǶÔÓ¦µÄ£¬¾ÍÊÇA±í¼¸¸öID£¬B±í¾Í¼¸¸öID¡£A±íµÄIDÊÇʲô,B±íµÄID¾ÍÊÇʲô¡£
¿ÉÊÇÏÖÔÚA±íµÄID±ÈB±íµÄ¶àÁË¡£
ÎÒÏÖÔÚÏëÒª°ÑB±íÖÐÉٵIJ¿·Ö¸ø²¹ÆëÁË¡£Õâ¸ö²åÈëÓ¦¸ÃÔõôд°¡£¿
SQL code:
insert into B(ID) select id from a where id not in (select id from b)
ÒýÓÃ
S ......