MS-SQL > where Àý¿¡¼ ³¯Â¥ °Ë»ö µî·ÏÀÏ : 2017-07-03 19:43 Á¶È¸¼ö : 52,482µ¥ÀÌÅÍÀÇ ³¯Â¥ÀÇ ±â°£À» °Ë»öÇÏ´Â °æ¿ì
select * from Table where (writeday>='2011-01-01 00:00:00' and writeday<='2011-01-31 23:59:59') ¿Í °°Àº °æ½ÄÀ¸·Î °Ë»ö°á°ú¸¦ ÀÐ¾î ¿Ã¼ö ÀÖ½À´Ï´Ù. ±×·¯³ª, »ó´çÇÑ µ¥ÀÌÅÍ°¡ ½×ÀÌ°Ô µÇ´Â °æ¿ì À§ÀÇ Äõ¸®¹® ³¯Â¥°Ë»ö¿¡¼ »ó´çÇÑ ºÎÇÏ°¡ °É¸®´Â°É È®ÀÎÇÒ ¼ö ÀÖ¾ú½À´Ï´Ù. ÀÌ Äõ¸®¸¦ ¾Æ·¡¿Í °°ÀÌ ¹Ù²Ù¾î ÁÖ¸é µ¥ÀÌÅ͸¦ Àд ½Ã°£ÀÌ »¡¶óÁú ¼ö ÀÖ½À´Ï´Ù. writeday select * from Table where (convert(varchar(100),writeday,25)>='2011-01-01 00:00:00' and convert(varchar(100),writeday,25)<='2011-01-31 23:59:59') convert ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© writeday Çü½ÄÀ» ¹®ÀÚÇüÀ¸·Î º¯°æÀ» ½Ãŵ´Ï´Ù. º¯°æÈÄ ¹®ÀÚ·Î ºñ±³ÇÏ°Ô µÇ¸é ¼Óµµ¸¦ Çâ»ó ½Ãų ¼ö ÀÖ½À´Ï´Ù. À§ÀÇ °æ¿ì 4¸¸°ÇÀÌ ³ÑÀº µ¥ÀÌÅ͸¦ °Ë»öÇÏ´Â ±â°£ÀÌ 20ÃÊ Á¤µµ·Î ´äÀÌ ¾È³ª¿À´Â ¼Óµµ¸¦ 2Ãʳ»·Î ¼Óµµ¸¦ Çâ»ó½ÃÄ×½À´Ï´Ù.
|