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

OracleÖвéѯ×òÌì00£º00µ½½ñÌì00£º00µÄsqlÔõôд£¿

ÔÚOracleÖУ¬ÎÒÏë²éϵͳʱ¼äÒ»ÌìµÄÊý¾Ý£¬Ê¹ÓÃÕâ¸öÓï¾ä
select * from tablename
where create_time>SYSDATE-1
and create_time <SYSDATE


ÎÒÏë²é×òÌì00£º00µ½½ñÌì00£º00µÄsqlÔõôд£¬
»òÕßÎÒÏë²éÇ°Ìì08£º00µ½½ñÌì08:00µÄsqlÔõôд£¬

µ±È»²»ÄÜд¾ßÌåʱ¼ä£¬ÒòΪÿ´ÎÎÒ¶¼²éÕâÖÖÊý¾Ý
select * from tablename
where create_time>= trunc(SYSDATE-1)
and create_time <trunc(SYSDATE )

select * from tablename
where create_time> trunc(SYSDATE-1)+ 8/24
and create_time < trunc(SYSDATE) + 8/24

select * from tablename
where create_time>to_date('20090103 00:00:00','yyyymmdd hh24:mi:ss')
and create_time <to_date(20090104 00:00:00','yyyymmdd hh24:mi:ss')

Ï붨ʱ²éѯ³öÊý¾Ý£¬×öÈÕÖ¾±¸·Ý»ò×öÆäËû´¦Àí£¬ÄǾÍд¸öjob
¶¨Ê±ÔËÐÐ



select * from tablename
where create_time>= trunc(SYSDATE-1)
and create_time <trunc(SYSDATE )

select * from tablename
where create_time> trunc(SYSDATE-1)+ 8/24
and create_time < trunc(SYSDATE) + 8/24
¶¥£¡

ÒýÓÃ
select * from tablename
where create_time>to_date('20090103 00:00:00','yyyymmdd hh24:mi:ss')
and create_time <to_date(20090104 00:00:00','yyyymmdd hh24:mi:ss')

Ï붨ʱ²éѯ³öÊý¾Ý£¬×öÈÕÖ¾±¸·Ý»ò×öÆäË


Ïà¹ØÎÊ´ð£º

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

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

sqlÓï¾ä¶à±í¶à×ֶβéѯ - MS-SQL Server / »ù´¡Àà

ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд 

ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......

ÊÇoracleµÄbugô£¿É¢·ÖÁË£¡ - Oracle / »ù´¡ºÍ¹ÜÀí

±¾À´ÒªÐ´¸öupdateÓï¾ä
update table_a A
  set A.flag=1
  where A.id in (select B.id from table_b B)
½á¹ûÎóд³É
update table_a A
  set A.flag=1
  where ......

oracleµ¼Èë»Ø¹ö - Oracle / ¿ª·¢

abnormal end of export file
IMP-00028: partial import of previous table rolled back: 3828 rows rolled back
  
ÓÐûÓÐÒ»ÖÖ·½·¨Èõ¼Èë¼ÌÐø½øÐжø²»Òì³£Ìø³ö»Ø¹ö£¿
ignore=y

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