<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>program1472 &amp;gt; 자료실 &amp;gt; MySQL</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04</link>
<language>ko</language>
<description>MySQL (2023-07-27 13:34:15)</description>

<item>
<title>[MySQL] A 테이블에 있고, B 테이블에 없는 데이터 조회 및 삭제</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=27</link>
<description><![CDATA[<div></div><div style="padding:0 6px;white-space:pre;line-height:130%;"></div><table class="__se_tbl" border="0" cellpadding="0" cellspacing="0" style="border:1px solid rgb(166,188,209);"><tbody><tr><td style="padding:3px 4px 2px;background-color:rgb(246,248,250);color:rgb(61,118,171);border-right:1px solid rgb(225,238,247);text-align:left;font-weight:normal;width:924px;height:18px;"><p> A테이블에 있고, B테이블에 없는 데이터 조회</p></td>


</tr><tr><td style="padding:3px 4px 2px;background-color:rgb(255,255,255);border-top:1px solid rgb(225,238,247);border-right:1px solid rgb(225,238,247);color:rgb(61,118,171);width:924px;height:18px;"><p> <span style="white-space:pre;color:rgb(255,51,153);">SELECT</span><span style="color:rgb(0,0,0);white-space:pre;"> </span><span style="white-space:pre;color:rgb(1,1,1);"></span><span style="white-space:pre;color:rgb(0,153,204);">*</span></p><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">FROM</span> <span style="color:rgb(125,161,35);">`collection_and_payment`</span> A</div><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;">LEFT OUTER JOIN <span style="color:rgb(125,161,35);">`balhaengmul`</span> B</div><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ON</span> A.uid<span style="color:rgb(1,1,1);"></span><span style="color:rgb(0,153,204);">=</span>B.rUid</div><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">WHERE</span> B.rUid IS <span style="color:rgb(255,51,153);">NULL</span>;</div></td>


</tr></tbody></table><div style="padding:0 6px;white-space:pre;line-height:130%;"><br /></div><div style="padding:0 6px;white-space:pre;line-height:130%;"></div><table class="__se_tbl" border="0" cellpadding="0" cellspacing="0" style="border:1px solid rgb(166,188,209);"><tbody><tr><td width="935" style="padding:3px 4px 2px;background-color:rgb(246,248,250);color:rgb(61,118,171);border-right:1px solid rgb(225,238,247);text-align:left;font-weight:normal;"><p> 삭제하기 위해서는 임시테이블 사용</p></td>


</tr><tr><td width="935" style="padding:3px 4px 2px;background-color:rgb(255,255,255);border-top:1px solid rgb(225,238,247);border-right:1px solid rgb(225,238,247);color:rgb(61,118,171);"><p> <span style="white-space:pre;color:rgb(255,51,153);">DELETE</span><span style="color:rgb(0,0,0);white-space:pre;"> </span><span style="white-space:pre;color:rgb(255,51,153);">FROM</span><span style="color:rgb(0,0,0);white-space:pre;"> </span><span style="white-space:pre;color:rgb(125,161,35);">`collection_and_payment`</span><span style="color:rgb(0,0,0);white-space:pre;"> </span><span style="white-space:pre;color:rgb(255,51,153);">WHERE</span><span style="color:rgb(0,0,0);white-space:pre;"> uid IN</span></p><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;">(<span style="color:rgb(255,51,153);">SELECT</span> <span style="color:rgb(1,1,1);"></span><span style="color:rgb(0,153,204);">*</span> <span style="color:rgb(255,51,153);">FROM</span> </div><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;">(<span style="color:rgb(255,51,153);">SELECT</span> A.uid</div><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">FROM</span> <span style="color:rgb(125,161,35);">`collection_and_payment`</span> A</div><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;">LEFT OUTER JOIN <span style="color:rgb(125,161,35);">`balhaengmul`</span> B</div><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ON</span> A.uid<span style="color:rgb(1,1,1);"></span><span style="color:rgb(0,153,204);">=</span>B.rUid</div><div style="color:rgb(0,0,0);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">WHERE</span> B.rUid IS <span style="color:rgb(255,51,153);">NULL</span>) AS temp_table);</div></td>


</tr></tbody></table><div style="padding:0 6px;white-space:pre;line-height:130%;"><br /></div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2023-07-27T13:34:15+09:00</dc:date>
</item>


<item>
<title>[SQL] MySQL 날짜 요일(DAYOFWEEK) 구하기 및 주의사항</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=26</link>
<description><![CDATA[<div></div><p><br /></p><p>특정 일자의 요일을 구하고자 할 때, 사용하는 함수가 존재한다. 모든 언어에 요일을 구하는 함수가 있으며, 표준이 있기 마련이다.</p><p><br /></p><p>일반적인 프로그래밍 언어는 전통적으로 일요일로 시작하며 0을 리턴한다.</p><table border="0" cellpadding="0" cellspacing="0" width="189" style="border-collapse:collapse;width:140pt;"><colgroup><col width="27" span="7" style="width:20pt;" /></colgroup><tbody><tr style="height:16.5pt;"><td height="22" width="27" style="height:16.5pt;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;border-left:0.5pt solid;">일</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">월</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">화</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">수</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">목</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">금</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-right:0.5pt solid;border-bottom:0.5pt dashed;">토</td>


 </tr><tr style="height:16.5pt;"><td height="22" style="height:16.5pt;border-top:none;text-align:center;border-bottom:0.5pt solid;border-left:0.5pt solid;">0</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">1</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">2</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">3</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">4</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">5</td>


  <td style="border-top:none;border-left:none;text-align:center;border-right:0.5pt solid;border-bottom:0.5pt solid;">6</td>


 </tr></tbody></table><p><br /></p><p>프로그래밍 언어와 다르게 ODBC에서는 다른 값을 리턴한다.</p><table border="0" cellpadding="0" cellspacing="0" width="189" style="border-collapse:collapse;width:140pt;"><colgroup><col width="27" span="7" style="width:20pt;" /></colgroup><tbody><tr style="height:16.5pt;"><td height="22" width="27" style="height:16.5pt;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;border-left:0.5pt solid;">일</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">월</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">화</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">수</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">목</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">금</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-right:0.5pt solid;border-bottom:0.5pt dashed;">토</td>


 </tr><tr style="height:16.5pt;"><td height="22" style="height:16.5pt;border-top:none;text-align:center;border-bottom:0.5pt solid;border-left:0.5pt solid;">1</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">2</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">3</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">4</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">5</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">6</td>


  <td style="border-top:none;border-left:none;text-align:center;border-right:0.5pt solid;border-bottom:0.5pt solid;">7</td>


 </tr></tbody></table><p><br /></p><p>여기서 MySQL과 MariaDB에서 제공하는 WEEKDAY()는 리턴 값이 ODBC 표준을 따르지 않는다는 점이다.</p><table border="0" cellpadding="0" cellspacing="0" width="189" style="border-collapse:collapse;width:140pt;"><colgroup><col width="27" span="7" style="width:20pt;" /></colgroup><tbody><tr style="height:16.5pt;"><td height="22" width="27" style="height:16.5pt;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;border-left:0.5pt solid;">일</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">월</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">화</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">수</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">목</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-bottom:0.5pt dashed;">금</td>


  <td width="27" style="border-left:none;width:20pt;text-align:center;border-top:0.5pt solid;border-right:0.5pt solid;border-bottom:0.5pt dashed;">토</td>


 </tr><tr style="height:16.5pt;"><td height="22" style="height:16.5pt;border-top:none;text-align:center;border-bottom:0.5pt solid;border-left:0.5pt solid;">0</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">1</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">2</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">3</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">4</td>


  <td style="border-top:none;border-left:none;text-align:center;border-bottom:0.5pt solid;">5</td>


  <td style="border-top:none;border-left:none;text-align:center;border-right:0.5pt solid;border-bottom:0.5pt solid;">6</td>


 </tr></tbody></table><p><br /></p><p>특별히 WEEKDAY()를 써야 되는 경우가 아니라면 ODBC 표준을 따르는 DAYOFWEEK()를 사용해야 실수를 줄일 수 있다.</p><p><span class="cm-keyword" style="color:rgb(119,0,136);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);"><a class="cm-sql-doc" href="http://atg-cas.iptime.org/wndlswkd/url.php?url=https://dev.mysql.com/doc/refman/8.0/en/select.html" style="border-bottom:1px dotted rgb(0,0,0);" rel="nofollow">SELECT</a></span><span style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);"> </span><span style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">DATE_FORMAT</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">(</span><span style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">NOW</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">(</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">)</span><span class="cm-punctuation" style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">,</span><span class="cm-string" style="color:rgb(170,17,17);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">"%Y-%m-%d"</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">)</span><span class="cm-punctuation" style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">,</span><span style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">WEEKDAY</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">(</span><span style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">NOW</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">(</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">)</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">)</span><span class="cm-punctuation" style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">,</span><span style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);"> </span><span style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">DAYOFWEEK</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">(</span><span style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">NOW</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">(</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">)</span><span class="cm-bracket" style="color:rgb(153,153,119);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">)</span><span class="cm-punctuation" style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);">;</span> </p><p><span class="cm-punctuation" style="color:rgb(68,68,68);font-family:monospace;font-size:13.12px;background-color:rgb(229,229,229);"><img src="../../../data/editor/2307/3caa644fa28c2ae7925b106343244e55_1690254847_9075.png" title="3caa644fa28c2ae7925b106343244e55_1690254847_9075.png" alt="3caa644fa28c2ae7925b106343244e55_1690254847_9075.png" /><br style="clear:both;" /> </span></p><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2023-07-25T12:14:24+09:00</dc:date>
</item>


<item>
<title>[MySQL] SELECT 문 특정 컬럼의 MIN값이 0보다 클경우 0을 반환하고 그렇지 않으면 MIN값을 반환</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=25</link>
<description><![CDATA[<div></div><p>보통 다른 언어에서는 IF문을 사용하지만 MySQL에서는 <span style="background-color:rgb(255,255,255);color:rgb(61,118,171);white-space:pre;">CASE</span>문을 사용합니다.</p><p><br /></p><table class="__se_tbl" border="0" cellpadding="0" cellspacing="0" style="border:1px solid rgb(166,188,209);"><tbody><tr><td width="935" style="padding:3px 4px 2px;background-color:rgb(246,248,250);color:rgb(61,118,171);border-right:1px solid rgb(225,238,247);text-align:left;font-weight:normal;"><p> </p></td>


</tr><tr><td width="935" style="padding:3px 4px 2px;background-color:rgb(255,255,255);border-top:1px solid rgb(225,238,247);border-right:1px solid rgb(225,238,247);color:rgb(61,118,171);"><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">SELECT</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">CASE</div><div style="padding:0 6px;white-space:pre;line-height:130%;">WHEN MIN(<span style="color:#7DA123;">`발주번호`</span>) <span style="color:#010101;"></span><span style="color:#0099cc;">-</span> <span style="color:#004fc8;">1</span> <span style="color:#010101;"></span><span style="color:#0099cc;">&gt;</span> <span style="color:#004fc8;">0</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">THEN <span style="color:#004fc8;">0</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">ELSE MIN(<span style="color:#7DA123;">`발주번호`</span>) <span style="color:#010101;"></span><span style="color:#0099cc;">-</span> <span style="color:#004fc8;">1</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">END AS V</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">FROM</span> <span style="color:#7DA123;">`order_delivery_number`</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">WHERE</span> <span style="color:#004fc8;">1<br /></span></div></td>


</tr></tbody></table><p><br /></p><p><span style="color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;font-size:15px;">위 쿼리를 실행시키면 다음과 같은 결과를 볼 수 있습니다.</span> </p><p><span style="color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;font-size:15px;"><img src="../../../data/editor/2307/3caa644fa28c2ae7925b106343244e55_1689124881_2105.png" title="3caa644fa28c2ae7925b106343244e55_1689124881_2105.png" alt="3caa644fa28c2ae7925b106343244e55_1689124881_2105.png" /><br style="clear:both;" /> </span></p><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2023-07-12T10:21:39+09:00</dc:date>
</item>


<item>
<title>[MySql] DB 백업</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=23</link>
<description><![CDATA[<div></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">&lt;?php</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">//<a href="https://atg-cas.iptime.org/db_backup.php?db_nm=alltogreen" rel="nofollow">https://atg-cas.iptime.org/db_backup.php?db_nm=alltogreen</a></span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">//<a href="https://atg-cas.iptime.org/db_backup.php?db_nm=aserpacific" rel="nofollow">https://atg-cas.iptime.org/db_backup.php?db_nm=aserpacific</a></span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">//<a href="https://atg-cas.iptime.org/db_backup.php?db_nm=jeju" rel="nofollow">https://atg-cas.iptime.org/db_backup.php?db_nm=jeju</a></span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">//<a href="https://atg-cas.iptime.org/db_backup.php?db_nm=mysql" rel="nofollow">https://atg-cas.iptime.org/db_backup.php?db_nm=mysql</a></span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">//<a href="https://atg-cas.iptime.org/db_backup.php?db_nm=information_schema" rel="nofollow">https://atg-cas.iptime.org/db_backup.php?db_nm=information_schema</a></span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">/**</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">* Updated: IT HUB. heesung byeon</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">* Website: program1472.com</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">*/</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">//MySQL server and database</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#066de2;">$dbhost</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'localhost'</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#066de2;">$dbuser</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'로그인아이디'</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#066de2;">$dbpass</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'로그인비번'</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#066de2;">$dbname</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#066de2;">isset</span>(<span style="color:#066de2;">$_GET</span>[<span style="color:#63a35c;">'db_nm'</span>])?<span style="color:#066de2;">$_GET</span>[<span style="color:#63a35c;">'db_nm'</span>]:<span style="color:#63a35c;">'*'</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#066de2;">$tables</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#066de2;">isset</span>(<span style="color:#066de2;">$_GET</span>[<span style="color:#63a35c;">'tb_nm'</span>])?<span style="color:#066de2;">$_GET</span>[<span style="color:#63a35c;">'tb_nm'</span>]:<span style="color:#63a35c;">'*'</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">//Call the core function</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">backup_tables(<span style="color:#066de2;">$dbhost</span>, <span style="color:#066de2;">$dbuser</span>, <span style="color:#066de2;">$dbpass</span>, <span style="color:#066de2;">$dbname</span>, <span style="color:#066de2;">$tables</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#999999;">//Core function</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#a71d5d;">function</span> backup_tables(<span style="color:#066de2;">$host</span>, <span style="color:#066de2;">$user</span>, <span style="color:#066de2;">$pass</span>, <span style="color:#066de2;">$databases</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'*'</span>, <span style="color:#066de2;">$tables</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'*'</span>) {</div><div style="padding:0 6px;white-space:pre;line-height:130%;">    <span style="color:#066de2;">$con</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_connect(<span style="color:#066de2;">$host</span>,<span style="color:#066de2;">$user</span>,<span style="color:#066de2;">$pass</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">    <span style="color:#999999;">// Check connection</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">    <span style="color:#a71d5d;">if</span> (mysqli_connect_errno())</div><div style="padding:0 6px;white-space:pre;line-height:130%;">    {</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#066de2;">echo</span> <span style="color:#63a35c;">"Failed to connect to MySQL: "</span> . mysqli_connect_error();</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#a71d5d;">exit</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">    }</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">    <span style="color:#a71d5d;">if</span>(<span style="color:#066de2;">$databases</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span><span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'*'</span>){</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#066de2;">$databases</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#066de2;">array</span>();</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#066de2;">$result</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_query(<span style="color:#066de2;">$con</span>, <span style="color:#63a35c;">'SHOW DATABASES'</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#a71d5d;">while</span>(<span style="color:#066de2;">$row</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_fetch_row(<span style="color:#066de2;">$result</span>))</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        {</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            <span style="color:#066de2;">$databases</span>[] <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#066de2;">$row</span>[<span style="color:#0099cc;">0</span>];</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">    } <span style="color:#a71d5d;">else</span> {</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#066de2;">$databases</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> is_array(<span style="color:#066de2;">$databases</span>) ? <span style="color:#066de2;">$databases</span> : <span style="color:#066de2;">explode</span>(<span style="color:#63a35c;">','</span>,<span style="color:#066de2;">$databases</span>);        </div><div style="padding:0 6px;white-space:pre;line-height:130%;">    }</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">    foreach(<span style="color:#066de2;">$databases</span> <span style="color:#a71d5d;">as</span> <span style="color:#066de2;">$database</span>)</div><div style="padding:0 6px;white-space:pre;line-height:130%;">    {</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        mysqli_select_db(<span style="color:#066de2;">$con</span>, <span style="color:#066de2;">$database</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        mysqli_query(<span style="color:#066de2;">$con</span>, <span style="color:#63a35c;">"SET NAMES 'utf8'"</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#066de2;">$table_array</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#066de2;">array</span>();</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#999999;">//get all of the tables</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#a71d5d;">if</span>(<span style="color:#066de2;">$tables</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span><span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'*'</span>)</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        {            </div><div style="padding:0 6px;white-space:pre;line-height:130%;">            <span style="color:#066de2;">$result</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_query(<span style="color:#066de2;">$con</span>, <span style="color:#63a35c;">'SHOW TABLES'</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            <span style="color:#a71d5d;">while</span>(<span style="color:#066de2;">$row</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_fetch_row(<span style="color:#066de2;">$result</span>))</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            {</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#066de2;">$table_array</span>[] <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#066de2;">$row</span>[<span style="color:#0099cc;">0</span>];</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#a71d5d;">else</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">        {</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            <span style="color:#066de2;">$table_array</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> is_array(<span style="color:#066de2;">$tables</span>) ? <span style="color:#066de2;">$tables</span> : <span style="color:#066de2;">explode</span>(<span style="color:#63a35c;">','</span>,<span style="color:#066de2;">$tables</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        }</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#066de2;">$return</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">''</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#999999;">//cycle through</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">        foreach(<span style="color:#066de2;">$table_array</span> <span style="color:#a71d5d;">as</span> <span style="color:#066de2;">$table</span>)</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        {</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            <span style="color:#066de2;">$result</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_query(<span style="color:#066de2;">$con</span>, <span style="color:#63a35c;">'SELECT * FROM '</span>.<span style="color:#066de2;">$table</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            <span style="color:#a71d5d;">if</span> (<span style="color:#066de2;">$result</span>){</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#066de2;">$num_fields</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_num_fields(<span style="color:#066de2;">$result</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#066de2;">$num_rows</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_num_rows(<span style="color:#066de2;">$result</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'DROP TABLE IF EXISTS '</span>.<span style="color:#066de2;">$table</span>.<span style="color:#63a35c;">';'</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#066de2;">$row2</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_fetch_row(mysqli_query(<span style="color:#066de2;">$con</span>, <span style="color:#63a35c;">'SHOW CREATE TABLE '</span>.<span style="color:#066de2;">$table</span>));</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">"\n\n"</span>.<span style="color:#066de2;">$row2</span>[<span style="color:#0099cc;">1</span>].<span style="color:#63a35c;">";\n\n"</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#066de2;">$counter</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#0099cc;">1</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#999999;">//Over tables</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#a71d5d;">for</span> (<span style="color:#066de2;">$i</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#0099cc;">0</span>; <span style="color:#066de2;">$i</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">&lt;</span> <span style="color:#066de2;">$num_fields</span>; <span style="color:#066de2;">$i</span>+<span style="color:#0086b3;"></span><span style="color:#a71d5d;">+</span>) </div><div style="padding:0 6px;white-space:pre;line-height:130%;">                {   <span style="color:#999999;">//Over rows</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">                    <span style="color:#a71d5d;">while</span>(<span style="color:#066de2;">$row</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> mysqli_fetch_row(<span style="color:#066de2;">$result</span>))</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                    {   </div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        <span style="color:#a71d5d;">if</span>(<span style="color:#066de2;">$counter</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span><span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#0099cc;">1</span>){</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                            <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'INSERT INTO '</span>.<span style="color:#066de2;">$table</span>.<span style="color:#63a35c;">' VALUES('</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        } <span style="color:#a71d5d;">else</span>{</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                            <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'('</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        }</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        <span style="color:#999999;">//Over fields</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        <span style="color:#a71d5d;">for</span>(<span style="color:#066de2;">$j</span>=<span style="color:#0099cc;">0</span>; <span style="color:#066de2;">$j</span>&lt;<span style="color:#066de2;">$num_fields</span>; <span style="color:#066de2;">$j</span>+<span style="color:#0086b3;"></span><span style="color:#a71d5d;">+</span>) </div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        {</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                            <span style="color:#066de2;">$row</span>[<span style="color:#066de2;">$j</span>] <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> addslashes(<span style="color:#066de2;">$row</span>[<span style="color:#066de2;">$j</span>]);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                            <span style="color:#066de2;">$row</span>[<span style="color:#066de2;">$j</span>] <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> str_replace(<span style="color:#63a35c;">"\n"</span>,<span style="color:#63a35c;">"\\n"</span>,<span style="color:#066de2;">$row</span>[<span style="color:#066de2;">$j</span>]);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                            <span style="color:#a71d5d;">if</span> (<span style="color:#066de2;">isset</span>(<span style="color:#066de2;">$row</span>[<span style="color:#066de2;">$j</span>])) { <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'"'</span>.<span style="color:#066de2;">$row</span>[<span style="color:#066de2;">$j</span>].<span style="color:#63a35c;">'"'</span> ; } <span style="color:#a71d5d;">else</span> { <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'""'</span>; }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                            <span style="color:#a71d5d;">if</span> (<span style="color:#066de2;">$j</span>&lt;(<span style="color:#066de2;">$num_fields</span>-<span style="color:#0099cc;">1</span>)) { <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">','</span>; }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        }</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        <span style="color:#a71d5d;">if</span>(<span style="color:#066de2;">$num_rows</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span><span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#066de2;">$counter</span>){</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                            <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">");\n"</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        } <span style="color:#a71d5d;">else</span>{</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                            <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">"),\n"</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                        <span style="color:#0086b3;"></span><span style="color:#a71d5d;">+</span><span style="color:#0086b3;"></span><span style="color:#a71d5d;">+</span><span style="color:#066de2;">$counter</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                    }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">                <span style="color:#066de2;">$return</span>.<span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span><span style="color:#63a35c;">"\n\n\n"</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        }</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#999999;">//save file</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#999999;">// $fileName = 'db-backup-'.$database.'-'.time().'-'.(md5(implode(',',$tables))).'.sql';</span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#066de2;">$fileName</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#63a35c;">'db/backup-'</span>.<span style="color:#066de2;">$database</span>.<span style="color:#63a35c;">'-'</span>.<span style="color:#066de2;">time</span>().<span style="color:#63a35c;">'.sql'</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#066de2;">$handle</span> <span style="color:#0086b3;"></span><span style="color:#a71d5d;">=</span> <span style="color:#066de2;">fopen</span>(<span style="color:#066de2;">$fileName</span>,<span style="color:#63a35c;">'w+'</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#066de2;">fwrite</span>(<span style="color:#066de2;">$handle</span>,<span style="color:#066de2;">$return</span>);</div><div style="padding:0 6px;white-space:pre;line-height:130%;">        <span style="color:#a71d5d;">if</span>(<span style="color:#066de2;">fclose</span>(<span style="color:#066de2;">$handle</span>)){</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            <span style="color:#066de2;">echo</span> <span style="color:#63a35c;">"Done, the file name is: "</span>.<span style="color:#066de2;">$fileName</span>.<span style="color:#63a35c;">'\r\n&lt;br&gt;'</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;">            <span style="color:#999999;">// exit; </span></div><div style="padding:0 6px;white-space:pre;line-height:130%;">        }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">    }</div><div style="padding:0 6px;white-space:pre;line-height:130%;">}</div><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2023-06-07T17:04:21+09:00</dc:date>
</item>


<item>
<title>[MySQL] A테이블에 있고, B테이블에 없는 데이터 조회 및 삭제</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=22</link>
<description><![CDATA[<div></div>A테이블에 있고, B테이블에 없는 데이터 조회<br /><table class="__se_tbl" border="0" cellpadding="0" cellspacing="0" style="border:1px solid rgb(166,188,209);"><tbody><tr><td width="935" style="padding:3px 4px 2px;background-color:rgb(246,248,250);color:rgb(61,118,171);border-right:1px solid rgb(225,238,247);text-align:left;font-weight:normal;"><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">SELECT</span> A.str_id</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">FROM</span> chat A</div><div style="padding:0 6px;white-space:pre;line-height:130%;">LEFT OUTER JOIN meeting B</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">ON</span> A.str_id<span style="color:#010101;"></span><span style="color:#0099cc;">=</span>B.multi_key</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">WHERE</span> B.multi_key IS <span style="color:#ff3399;">NULL</span>;</div></td>


</tr></tbody></table><p><br /></p><p>임시테이블을 이용한 A테이블에 있고, B테이블에 없는 데이터 삭제</p><table class="__se_tbl" border="0" cellpadding="0" cellspacing="0" style="border:1px solid rgb(166,188,209);"><tbody><tr><td width="935" style="padding:3px 4px 2px;background-color:rgb(246,248,250);color:rgb(61,118,171);border-right:1px solid rgb(225,238,247);text-align:left;font-weight:normal;"><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">DELETE</span> <span style="color:#ff3399;">FROM</span> chat <span style="color:#ff3399;">WHERE</span> str_id IN</div><div style="padding:0 6px;white-space:pre;line-height:130%;">(<span style="color:#ff3399;">SELECT</span> <span style="color:#010101;"></span><span style="color:#0099cc;">*</span> <span style="color:#ff3399;">FROM</span> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">(<span style="color:#ff3399;">SELECT</span> A.str_id</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">FROM</span> chat A</div><div style="padding:0 6px;white-space:pre;line-height:130%;">LEFT OUTER JOIN meeting B</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">ON</span> A.str_id<span style="color:#010101;"></span><span style="color:#0099cc;">=</span>B.multi_key</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">WHERE</span> B.multi_key IS <span style="color:#ff3399;">NULL</span>) AS temp_table);</div></td>


</tr></tbody></table><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2023-02-21T11:45:17+09:00</dc:date>
</item>


<item>
<title>[MySql] MYSQL에서 문자열 SPLIT 해서 UPDATE(업데이트) - SUBSTRING_INDEX</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=21</link>
<description><![CDATA[<div></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><b><span style="font-size:18pt;color:rgb(255,0,0);">Example:)</span></b></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><br /></div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:rgb(255,51,153);font-size:11pt;">UPDATE</span><span style="font-size:11pt;"> </span><span style="color:rgb(125,161,35);font-size:11pt;">`지도검색`</span><span style="font-size:11pt;"> </span><span style="color:rgb(255,51,153);font-size:11pt;">SET</span><span style="font-size:11pt;"> </span><span style="color:rgb(125,161,35);font-size:11pt;">`eMail`</span><span style="font-size:11pt;"> </span><span style="color:rgb(1,1,1);"></span><span style="color:rgb(0,153,204);font-size:11pt;">=</span><span style="font-size:11pt;"> SUBSTRING_INDEX(</span><span style="color:rgb(125,161,35);font-size:11pt;">`homePage`</span><span style="font-size:11pt;">, </span><span style="color:rgb(125,161,35);font-size:11pt;">'/'</span><span style="font-size:11pt;">, </span><span style="color:rgb(1,1,1);"></span><span style="color:rgb(0,153,204);font-size:11pt;">-</span><span style="color:rgb(0,79,200);font-size:11pt;">1</span><span style="font-size:11pt;">) </span><span style="color:rgb(255,51,153);font-size:11pt;">WHERE</span><span style="font-size:11pt;"> </span><span style="color:rgb(125,161,35);font-size:11pt;">`homePage`</span><span style="font-size:11pt;"> </span><span style="color:rgb(255,51,153);font-size:11pt;">LIKE</span><span style="font-size:11pt;"> </span><span style="color:rgb(125,161,35);font-size:11pt;">'%blog.naver.com%'</span><span style="font-size:11pt;">;</span> </div><div style="text-align:left;padding:0px 6px;white-space:pre;line-height:130%;" align="left"><div style="padding:0 6px;white-space:pre;line-height:130%;"><br /></div><p><img src="../../../data/editor/2209/f224b7a36d783768e70e08c94f8944ae_1663391884_3067.png" title="f224b7a36d783768e70e08c94f8944ae_1663391884_3067.png" alt="f224b7a36d783768e70e08c94f8944ae_1663391884_3067.png" /><br style="clear:both;" /><br style="clear:both;" /> 응용:)</p><p><span style="color:rgb(255,51,153);">UPDATE</span> <span style="color:rgb(125,161,35);">`지도검색`</span> <span style="color:rgb(255,51,153);">SET</span> <span style="color:rgb(125,161,35);">`eMail`</span> <span style="color:rgb(1,1,1);"></span><span style="color:rgb(0,153,204);">=</span> <span style="color:rgb(255,0,0);"><b>CONCAT</b></span>(SUBSTRING_INDEX(<span style="color:rgb(125,161,35);">`homePage`</span>, <span style="color:rgb(125,161,35);">'/'</span>, <span style="color:rgb(1,1,1);"></span><span style="color:rgb(0,153,204);">-</span><span style="color:rgb(0,79,200);">1</span>),<span style="color:rgb(125,161,35);">'@naver.com'</span>) <span style="color:rgb(255,51,153);">WHERE</span> <span style="color:rgb(125,161,35);">`homePage`</span> <span style="color:rgb(255,51,153);">LIKE</span> <span style="color:rgb(125,161,35);">'%blog.naver.com%'</span> </p></div><div style="text-align:left;padding:0px 6px;white-space:pre;line-height:130%;" align="left"><br /></div><div style="text-align:left;padding:0px 6px;white-space:pre;line-height:130%;" align="left"><br /></div><div style="padding:0px 6px;line-height:130%;"><p style="text-align:center;white-space:normal;margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;" align="center"><span style="font-size:12pt;"><b>MYSQL에서는 SPLIT 함수가 없어서,</b></span></p><p style="text-align:center;white-space:normal;margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;" align="center"><b><span style="font-size:12pt;">SUBSTRING_INDEX</span><span style="font-size:12pt;"> </span><span style="font-size:12pt;">함수를 사용해서 SPLIT 기능을 구현할 수 있습니다.</span></b></p><p style="text-align:center;white-space:normal;margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;" align="center"><b><span style="color:rgb(102,102,102);font-size:12pt;">SUBSTRING_INDEX</span><span style="color:rgb(102,102,102);font-size:12pt;">(</span><span style="color:rgb(0,109,215);font-size:12pt;">문자열</span><span style="color:rgb(102,102,102);font-size:12pt;">,</span><span style="color:rgb(102,102,102);font-size:12pt;"> </span><span style="color:rgb(138,61,182);font-size:12pt;">구분자</span><span style="color:rgb(102,102,102);font-size:12pt;">,</span><span style="color:rgb(102,102,102);font-size:12pt;"> </span><span style="color:rgb(239,83,105);font-size:12pt;">구분자의 index</span><span style="color:rgb(102,102,102);font-size:12pt;">)</span><span style="font-size:12pt;"> </span></b></p><p style="text-align:center;white-space:normal;margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;" align="center"><b><span style="font-size:12pt;"><br /></span></b></p><p style="text-align:center;white-space:normal;margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;" align="center"><b><span style="font-size:12pt;">"하나-둘-셋"</span></b><span style="font-size:12pt;"> </span><span style="font-size:12pt;">이라는 문자열을 구분자</span><span style="font-size:12pt;"> </span><b><span style="font-size:12pt;">-</span></b><span style="font-size:12pt;">에 따라 나누어 출력해보겠습니다. </span></p><table border="1" style="white-space:normal;text-align:center;margin-bottom:20px;width:740px;border:1px solid rgb(230,230,230);border-collapse:collapse;font-size:0.9375em;line-height:1.5714;color:rgb(102,102,102);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;"><tbody><tr><td style="text-align:center;margin:0px;padding:8px;border:1px solid rgb(155,155,155);background-color:rgb(155,155,155);color:rgb(255,255,255);width:352.5px;"><span style="font-size:12pt;">구문</span></td><td style="text-align:center;margin:0px;padding:8px;border:1px solid rgb(155,155,155);background-color:rgb(155,155,155);color:rgb(255,255,255);width:352.5px;"><span style="font-size:12pt;">결과</span></td></tr><tr><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);background-color:rgb(220,221,221);width:352.5px;"><span style="font-size:12pt;">SUBSTRING_INDEX('하나-둘-셋', '-', 1) </span></td><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);width:352.5px;"><span style="font-size:12pt;">하나</span></td></tr><tr><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);background-color:rgb(220,221,221);width:352.5px;"><span style="font-size:12pt;">SUBSTRING_INDEX('하나-둘-셋', '-', 2) </span></td><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);background-color:rgb(240,240,240);width:352.5px;"><span style="font-size:12pt;">하나-둘</span></td></tr><tr><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);background-color:rgb(220,221,221);width:352.5px;"><span style="font-size:12pt;">SUBSTRING_INDEX('하나-둘-셋', '-', 3) </span></td><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);width:352.5px;"><span style="font-size:12pt;">하나-둘-셋</span></td></tr><tr><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);background-color:rgb(220,221,221);width:352.5px;"><span style="font-size:12pt;">SUBSTRING_INDEX('하나-둘-셋', '-', -1) </span></td><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);background-color:rgb(240,240,240);width:352.5px;"><span style="font-size:12pt;">셋</span></td></tr><tr><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);background-color:rgb(220,221,221);width:352.5px;"><span style="font-size:12pt;">SUBSTRING_INDEX('하나-둘-셋', '-', -2) </span></td><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);width:352.5px;"><span style="font-size:12pt;">둘-셋</span></td></tr><tr><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);background-color:rgb(220,221,221);width:352.5px;"><span style="font-size:12pt;">SUBSTRING_INDEX('하나-둘-셋', '-', -3) </span></td><td style="text-align:center;margin:0px;padding:8px;border-left:1px solid rgb(230,230,230);border-top:1px solid rgb(230,230,230);background-color:rgb(240,240,240);width:352.5px;"><span style="font-size:12pt;">하나-둘-셋</span></td></tr></tbody></table><div style="text-align:center;"><span style="white-space:pre;"> </span></div></div><p style="margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;text-align:center;"><span style="font-size:12pt;">SUBSTRING_INDEX 함수는 문자열의 첫부분 혹은 끝부분부터 자르는 함수이기때문에</span></p><p style="margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;text-align:center;"><span style="font-size:12pt;">SPLIT처럼단순하게 출력할 수 없습니다.</span></p><p style="margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;text-align:center;"><span style="font-size:12pt;">대신, SUBSTRING을 한번 더 씌우는 방식으로 중간 문자열을 가져올 수 있습니다.</span></p><p style="margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;text-align:center;"><span style="color:rgb(0,154,135);font-size:12pt;">SUBSTRING_INDEX</span><span style="color:rgb(102,102,102);font-size:12pt;">(</span><span style="color:rgb(0,109,215);font-size:12pt;"><b>SUBSTRING_INDEX('하나-둘-셋' '-', -2)</b></span><span style="color:rgb(0,154,135);font-size:12pt;">, '-', 1)</span><span style="font-size:12pt;"> </span></p><p style="margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;text-align:center;"><span style="font-size:18pt;color:rgb(255,0,0);"><b>결과:)</b></span></p><p style="margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;text-align:center;"><b><span style="font-size:12pt;">SUBSTRING_INDEX('하나-둘-셋' '-', -2)  ----결과----&gt; '둘-셋'</span></b></p><p style="margin-bottom:32px;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;text-align:center;"><span style="font-size:16px;">↓</span></p><p style="margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;text-align:center;"><b><span style="font-size:12pt;">SUBSTRING_INDEX('둘-셋', '-', 1) ----결과----&gt; '둘'</span></b></p><p style="margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;text-align:center;"><b><span style="font-size:12pt;"><br /></span></b></p><p style="text-align:right;margin-bottom:32px;font-size:0.9375em;line-height:2;color:rgb(85,85,85);font-family:AppleSDGothicNeo, 'Noto Sans KR', sans-serif;" align="right"><span style="color:rgb(0,0,0);font-family:Arial;font-size:7pt;">﻿</span><span style="color:rgb(0,0,0);font-family:'Malgun Gothic';font-size:medium;"></span><span style="color:rgb(194,194,194);font-family:Arial;font-size:7pt;">출처:) h t t p s : / / d a i l y - s t r u g g l e . t i s t o r y . c o m / 4 8</span><b><span style="font-size:12pt;"> </span></b></p><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2022-09-17T14:18:17+09:00</dc:date>
</item>


<item>
<title>[MySQL] 테이블, 컬럼 코멘트(Comment) 조회</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=19</link>
<description><![CDATA[<div></div><p style="text-align:right;" align="right">출처: https://extbrain.tistory.com/97 [확장형 뇌 저장소]<br /></p><h1 style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', Dotum, '돋움', 'Noto Sans KR', 'Nanum Gothic', Lato, Helvetica, sans-serif;">▶MySQL 테이블, 컬럼 코멘트(Comment) 조회</h1><hr class="tx-hr-border-2" style="color:rgb(51,51,51);font-family:'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', Dotum, '돋움', 'Noto Sans KR', 'Nanum Gothic', Lato, Helvetica, sans-serif;font-size:14px;border-color:#000000;" /><p style="color:rgb(51,51,51);font-family:'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', Dotum, '돋움', 'Noto Sans KR', 'Nanum Gothic', Lato, Helvetica, sans-serif;font-size:14px;"><br /></p><p style="color:rgb(51,51,51);font-family:'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', Dotum, '돋움', 'Noto Sans KR', 'Nanum Gothic', Lato, Helvetica, sans-serif;font-size:14px;"><br /></p><div style="color:rgb(51,51,51);font-family:'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', Dotum, '돋움', 'Noto Sans KR', 'Nanum Gothic', Lato, Helvetica, sans-serif;font-size:14px;"><h2 style="font-size:1.62em;margin:0px;padding:0px;">▶설명</h2><hr /><p>MySQL에서 테이블과 컬럼에 작성되어 있는 코멘트를 조회할 수 있는 방법을 기록했습니다.</p><p><br /></p></div><div style="color:rgb(51,51,51);font-family:'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', Dotum, '돋움', 'Noto Sans KR', 'Nanum Gothic', Lato, Helvetica, sans-serif;font-size:14px;"><h2 style="font-size:1.62em;margin:0px;padding:0px;">▶테이블 코멘트(Comment) 조회</h2><hr /><p><br /></p><div><h3 style="font-size:1.44em;margin:0px;padding:0px;">DB 전체 테이블 코멘트 조회</h3><pre class="hljs sql" style="padding:0.5em;background:#FFFFFF;color:#000000;"><span class="hljs-keyword" style="color:rgb(0,0,255);">SELECT</span> 


    table_name, table_comment


<span class="hljs-keyword" style="color:rgb(0,0,255);">FROM</span>


    information_schema.tables


<span class="hljs-keyword" style="color:rgb(0,0,255);">WHERE</span>


    table_schema = <span class="hljs-string" style="color:rgb(163,21,21);">'DB 이름'</span> <span class="hljs-keyword" style="color:rgb(0,0,255);">AND</span> table_name = <span class="hljs-string" style="color:rgb(163,21,21);">'테이블 이름'</span>;</pre></div><p><br /></p><div><h3 style="font-size:1.44em;margin:0px;padding:0px;">DB 특정 테이블 코멘트 조회</h3><pre class="hljs sql" style="padding:0.5em;background:#FFFFFF;color:#000000;"><span class="hljs-keyword" style="color:rgb(0,0,255);">SELECT</span> 


    table_name, table_comment


<span class="hljs-keyword" style="color:rgb(0,0,255);">FROM</span>


    information_schema.tables


<span class="hljs-keyword" style="color:rgb(0,0,255);">WHERE</span>


    table_schema = <span class="hljs-string" style="color:rgb(163,21,21);">'DB 이름'</span> <span class="hljs-keyword" style="color:rgb(0,0,255);">AND</span> table_name = <span class="hljs-string" style="color:rgb(163,21,21);">'테이블 이름'</span>;</pre></div></div><p style="color:rgb(51,51,51);font-family:'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', Dotum, '돋움', 'Noto Sans KR', 'Nanum Gothic', Lato, Helvetica, sans-serif;font-size:14px;"><br /></p><div style="color:rgb(51,51,51);font-family:'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', Dotum, '돋움', 'Noto Sans KR', 'Nanum Gothic', Lato, Helvetica, sans-serif;font-size:14px;"><h2 style="font-size:1.62em;margin:0px;padding:0px;">▶컬럼 코멘트(Comment) 조회</h2><hr /><p><br /></p><div><h3 style="font-size:1.44em;margin:0px;padding:0px;">DB 전체 테이블 컬럼 코멘트 조회</h3><pre class="hljs sql" style="padding:0.5em;background:#FFFFFF;color:#000000;"><span class="hljs-keyword" style="color:rgb(0,0,255);">SELECT</span>


    table_name, column_name, column_comment


<span class="hljs-keyword" style="color:rgb(0,0,255);">FROM</span>


    information_schema.columns


<span class="hljs-keyword" style="color:rgb(0,0,255);">WHERE</span>


    table_schema = <span class="hljs-string" style="color:rgb(163,21,21);">'DB 이름'</span>;</pre></div><p><br /></p><div><h3 style="font-size:1.44em;margin:0px;padding:0px;">DB 특정 테이블 컬럼 코멘트 조회</h3><pre class="hljs sql" style="padding:0.5em;background:#FFFFFF;color:#000000;"><span class="hljs-keyword" style="color:rgb(0,0,255);">SELECT</span>


    table_name, column_name, column_comment


<span class="hljs-keyword" style="color:rgb(0,0,255);">FROM</span>


    information_schema.columns


<span class="hljs-keyword" style="color:rgb(0,0,255);">WHERE</span>


    table_schema = <span class="hljs-string" style="color:rgb(163,21,21);">'DB 이름'</span> <span class="hljs-keyword" style="color:rgb(0,0,255);">AND</span> table_name = <span class="hljs-string" style="color:rgb(163,21,21);">'테이블 이름'</span>;</pre></div></div><p><br style="color:rgb(51,51,51);font-family:'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', Dotum, '돋움', 'Noto Sans KR', 'Nanum Gothic', Lato, Helvetica, sans-serif;font-size:14px;" /><br /></p><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2021-08-29T14:57:44+09:00</dc:date>
</item>


<item>
<title>MySQL 공백, 탭, 라인피드, 캐리지리턴 등을 제거하는 방법</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=16</link>
<description><![CDATA[<div></div><p>MySQL 공백, 탭, 라인피드, 캐리지리턴 등을 제거하는 방법</p><p><br /></p><p>필드값 변경 함수</p><p><br /></p><p>replace(필드명, 변경할 문자, 변경될 문자)</p><p>- '필드명'에 해당하는 레코드에서 '변경할 문자'를 모두 '변경될 문자'로 변경한다.</p><p><br /></p><p>1. 공백제거(앞/뒤의 공백을 제거한다)</p><p>- update table set field = replace(field, ' ', '');</p><p>* table은 테이블명, field는 필드명이다. </p><p><br /></p><p>2. 개행문자 제거</p><p>- update table set field = replace(field, '\r\n', '');</p><p><br /></p><p>3. 탭( Tab - char(9) ) 제거</p><p>- update table set field = replace(field, char(9), '');</p><p>- field 값에 탭(char(9))이 있다면, 없애서('') 레코드 값을 수정하라.</p><p><br /></p><p>4. 라인피드(Line Feed) 제거</p><p>- update table set field = replace(field, char(10), '');</p><p>- field 값에 라인피드(char(10))이 있다면, 없애서('') 레코드 값을 수정하라.</p><p><br /></p><p>5. 캐리지리턴(Carriage Return) 제거</p><p>- update table set field = replace(field, char(13), '');</p><p>- field 값에 캐리지리턴(char(13))이 있다면, 없애서('') 레코드 값을 수정하라.</p><p><br /></p><p>이쯤 되면 응용도 가능하다. </p><p><br /></p><p>6. 하이픈( - ) 제거</p><p>- update table set field = replace(field, '-', '');</p><p>출처: httpsː//curryyou.tistory.com/68 [카레유]</p><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2021-02-24T20:42:06+09:00</dc:date>
</item>


<item>
<title>[MySQL] 내용 추가 / 값 추가</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=15</link>
<description><![CDATA[<div></div><p><span style="font-family:'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', Dotdum;color:rgb(51,51,51);"><span style="font-size:14px;">UPDATE `job_order` SET `InvoiceNumber` = concat(`InvoiceNumber`, '추가할값') WHERE `uid` = 1</span></span> </p><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2021-02-23T11:02:24+09:00</dc:date>
</item>


<item>
<title>mysql DB에서 쿼리에 영향을 줄 수 있는 문자열이나 특수문자 등을 확인하고 처리</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=14</link>
<description><![CDATA[<div></div><p><span style="font-family:'Nanum Gothic';font-size:15px;background-color:rgb(255,255,255);">mysql DB에서 쿼리에 영향을 줄 수 있는 문자열이나 특수문자 등을 확인하고 처리해야합니다. </span></p><p><span style="font-family:'Nanum Gothic';font-size:15px;background-color:rgb(255,255,255);">이 방법으로 아래의 함수를 이용해 확인 가능합니다.</span><br style="font-family:'Nanum Gothic';font-size:15px;background-color:rgb(255,255,255);" /></p><div class="code" style="clear:both;margin:12px 0px;width:800px;height:auto;line-height:20px;color:rgb(221,221,221);background:rgb(34,34,34);padding:5px 8px 5px 28px;font-size:13px;max-width:1024px;font-family:'Nanum Gothic';">mysqli_real_escape_string($dbc, 처리할 문자열);</div><div></div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2021-02-22T13:40:16+09:00</dc:date>
</item>


<item>
<title>[MySQL] AUTO_INCREMENT 값을 초기화 후, 테이블 안의 모든 데이터의 ID값을 재조정</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=13</link>
<description><![CDATA[<table border="0" cellpadding="0" cellspacing="0" style="border:1px solid #cccccc;border-left:0;border-bottom:0;" class="__se_tbl"><tbody><tr><td style="border:1px solid #cccccc;border-top:0;border-right:0;background-color:#ffffff;" width="741"><p>AUTO_INCREMENT 값을 초기화 하려면, 아래와 같은 쿼리를 실행시켜주면 됩니다.</p><p><br /></p><p><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;color:rgb(255,51,153);">ALTER</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;"> </span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;color:rgb(255,51,153);">TABLE</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;"> [테이블명] </span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;color:rgb(255,51,153);">AUTO_INCREMENT</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;color:rgb(0,153,204);">=</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;color:rgb(0,79,200);">1</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;">;</span> </p><p><br /></p><p>하지만 이 경우에는, 테이블에 새로 시작할 값보다 높은 값이 있으면 안됩니다.</p></td>


</tr></tbody></table><p><br /></p><table border="0" cellpadding="0" cellspacing="0" style="border:1px solid #cccccc;border-left:0;border-bottom:0;" class="__se_tbl"><tbody><tr><td style="border:1px solid #cccccc;border-top:0;border-right:0;background-color:#ffffff;" width="758"><p> <span style="white-space:pre;color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;">아래는 </span><span style="white-space:pre;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;color:rgb(255,51,153);">AUTO_INCREMENT</span><span style="white-space:pre;color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;"> 값을 초기화 후, 테이블 안의 모든 데이터의 ID값을 재조정하는 방법입니다.</span></p><div style="margin:0;padding:0;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;line-height:130%;"><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">ALTER</span> <span style="color:#ff3399;">TABLE</span> [테이블명] <span style="color:#ff3399;">AUTO_INCREMENT</span><span style="color:#0099cc;">=</span><span style="color:#004fc8;">1</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">SET</span> @COUNT <span style="color:#0099cc;">=</span> <span style="color:#004fc8;">0</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;"><span style="color:#ff3399;">UPDATE</span> [테이블명] <span style="color:#ff3399;">SET</span> [<span style="color:#ff3399;">AUTO_INCREMENT</span> 열 이름] <span style="color:#0099cc;">=</span> @COUNT:<span style="color:#0099cc;">=</span>@COUNT<span style="color:#0099cc;">+</span><span style="color:#004fc8;">1</span>;</div><div style="padding:0 6px;white-space:pre;line-height:130%;"> </div><div style="padding:0 6px;white-space:pre;line-height:130%;">위 쿼리문은 현재 모든 데이터 ID값을 1부터 재조정하고, 다음 인덱스 값을 [마지막 행번호 <span style="color:#0099cc;">+</span> <span style="color:#004fc8;">1</span>] 로 정하는 명령어입니다.</div></div></td>


</tr></tbody></table>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2020-07-15T20:00:01+09:00</dc:date>
</item>


<item>
<title>[MySQL] 1GB .sql 파일을 phpmyadmin으로 가져 오는 방법</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=12</link>
<description><![CDATA[<p style="margin-bottom:1em;border:0px;line-height:inherit;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;vertical-align:baseline;clear:both;color:rgb(36,39,41);background-color:rgb(255,255,255);"><span>phpmyadmin을 통해 1GB 파일을 가져올 수 있다고 생각하지만 php.ini에서 다음 값을 증가 시켜서 다시 시작하십시오.</span></p><pre class="lang-sql prettyprint prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:12px 8px;border:0px;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;width:auto;max-height:600px;color:rgb(36,39,41);"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">post_max_size</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">=</span><span class="lit" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">1280</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">M


upload_max_filesize</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">=</span><span class="lit" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">1280</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">M


max_execution_time </span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"> </span><span class="lit" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">300</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"> </span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">//</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">increase time </span><span class="kwd" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">as</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"> per your server requirement</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"> </span></code></pre><p style="margin-bottom:1em;border:0px;line-height:inherit;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;vertical-align:baseline;clear:both;color:rgb(36,39,41);background-color:rgb(255,255,255);"><span>명령 프롬프트에서 아래 명령을 시도해도 MySQL 설치에 따라 경로가 다를 수 있습니다.</span></p><pre class="lang-sql prettyprint prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:12px 8px;border:0px;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;width:auto;max-height:600px;color:rgb(36,39,41);"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">C</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">:\</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">wamp</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">\</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">bin</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">\</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">mysql</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">\</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">mysql5</span><span class="lit" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">.5.24</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">\</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">bin</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">\</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">mysql</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">exe </span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">-</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">u root </span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">-</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">p db_name </span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">&lt;</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"> C</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">:\</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">some_path</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">\</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">your_sql_file</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">sql</span></code></pre><p style="margin-bottom:1em;border:0px;line-height:inherit;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;vertical-align:baseline;clear:both;color:rgb(36,39,41);background-color:rgb(255,255,255);"><span><span>오류 </span><span>를 피하기 위해 </span></span><code style="margin:0px;padding:1px 5px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;white-space:pre-wrap;">max_allowed_packet</code><span><span>mysql을 </span><span>늘리는 것보다 db가 훨씬 큰 경우 </span><span>다음과 같이하십시오.</span></span><code style="margin:0px;padding:1px 5px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;white-space:pre-wrap;">my.ini</code><code style="margin:0px;padding:1px 5px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;white-space:pre-wrap;">MySQL server gone away</code></p><pre class="lang-sql prettyprint prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:12px 8px;border:0px;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;width:auto;max-height:600px;color:rgb(36,39,41);"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">max_allowed_packet </span><span class="pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"> </span><span class="lit" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">100</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;">M</span></code></pre><pre class="lang-sql prettyprint prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:12px 8px;border:0px;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;width:auto;max-height:600px;color:rgb(36,39,41);"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"><br /></span></code></pre><pre class="lang-sql prettyprint prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:12px 8px;border:0px;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;width:auto;max-height:600px;color:rgb(36,39,41);"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"><br /></span></code></pre><pre class="lang-sql prettyprint prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:12px 8px;border:0px;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;width:auto;max-height:600px;color:rgb(36,39,41);"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"><br /></span></code></pre><pre class="lang-sql prettyprint prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:12px 8px;border:0px;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;vertical-align:baseline;width:auto;max-height:600px;color:rgb(36,39,41);"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"><span class="pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-family:inherit;vertical-align:baseline;"></span></code></pre><p class="ui_qtext_para u-ltr u-text-align--start" style="margin-bottom:1em;color:rgb(51,51,51);font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen-Sans', Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size:15px;white-space:normal;"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;">max_execution_time = 200000</code></p><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"></code><p class="ui_qtext_para u-ltr u-text-align--start" style="margin-bottom:1em;color:rgb(51,51,51);font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen-Sans', Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size:15px;white-space:normal;"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"><span style="font-style:inherit;font-weight:inherit;">max_input_time = 200000</span></code></p><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"></code><p class="ui_qtext_para u-ltr u-text-align--start" style="margin-bottom:1em;color:rgb(51,51,51);font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen-Sans', Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size:15px;white-space:normal;"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;">memory_limit = 1000M</code></p><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"></code><p class="ui_qtext_para u-ltr u-text-align--start" style="margin-bottom:1em;color:rgb(51,51,51);font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen-Sans', Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size:15px;white-space:normal;"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;">upload_max_filesize = 750M</code></p><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"></code><p class="ui_qtext_para u-ltr u-text-align--start" style="margin-bottom:1em;color:rgb(51,51,51);font-family:'-apple-system', BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen-Sans', Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size:15px;white-space:normal;"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;">post_max_size = 750M</code></p><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;white-space:inherit;"></code>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2020-05-16T16:20:37+09:00</dc:date>
</item>


<item>
<title>[MySQL] 여러개의 컬럼을 그룹으로 묶어서 검색</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=11</link>
<description><![CDATA[<p><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(255,51,153);">SELECT</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);"> max(uid), CONCAT (</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`od_no`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);">,</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`sku_id`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);">,</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`bl_no`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);">) AS Group1, count(CONCAT (</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`od_no`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);">,</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`sku_id`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);">,</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`bl_no`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);">)) </span></p><p><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(255,51,153);">FROM</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);"> </span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`cp_bill`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);"> GROUP </span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(255,51,153);">BY</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);"> Group1 having count(CONCAT (</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`od_no`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);">,</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`sku_id`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);">,</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(125,161,35);">`bl_no`</span><span style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);">))</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(0,153,204);">&gt;</span><span style="font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;white-space:pre;background-color:rgb(250,250,250);color:rgb(0,79,200);">1</span> </p><p><br /></p>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2020-03-23T12:19:03+09:00</dc:date>
</item>


<item>
<title>[MySQL] 기존 테이블에 고유 키를 추가하는 방법</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=10</link>
<description><![CDATA[<div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;">아래 사이트에 다양한 답변들이 올라와 있습니다.</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;">https:<span style="color:rgb(0,153,204);">/</span><span style="color:rgb(0,153,204);">/</span>stackoverflow.com<span style="color:rgb(0,153,204);">/</span>questions<span style="color:rgb(0,153,204);">/</span><span style="color:rgb(0,79,200);">15255304</span><span style="color:rgb(0,153,204);">/</span>how<span style="color:rgb(0,153,204);">-</span><span style="color:rgb(255,51,153);">add</span><span style="color:rgb(0,153,204);">-</span><span style="color:rgb(255,51,153);">unique</span><span style="color:rgb(0,153,204);">-</span><span style="color:rgb(255,51,153);">key</span><span style="color:rgb(0,153,204);">-</span>to<span style="color:rgb(0,153,204);">-</span>existing<span style="color:rgb(0,153,204);">-</span><span style="color:rgb(255,51,153);">table</span><span style="color:rgb(0,153,204);">-</span>with<span style="color:rgb(0,153,204);">-</span>non<span style="color:rgb(0,153,204);">-</span>uniques<span style="color:rgb(0,153,204);">-</span>rows</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ALTER</span> <span style="color:rgb(255,51,153);">TABLE</span> TABLE_NAME <span style="color:rgb(255,51,153);">ADD</span> Id <span style="color:rgb(0,153,204);">INT</span> <span style="color:rgb(255,51,153);">AUTO_INCREMENT</span> <span style="color:rgb(255,51,153);">PRIMARY</span> <span style="color:rgb(255,51,153);">KEY</span>;</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ALTER</span> <span style="color:rgb(255,51,153);">TABLE</span> TABLE_NAME <span style="color:rgb(255,51,153);">ADD</span> <span style="color:rgb(255,51,153);">CONSTRAINT</span> constr_ID <span style="color:rgb(255,51,153);">UNIQUE</span> (user_id, game_id, date, time);</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ALTER</span> <span style="color:rgb(255,51,153);">TABLE</span> Table_Name <span style="color:rgb(255,51,153);">ADD</span> <span style="color:rgb(255,51,153);">UNIQUE</span> (column_name);</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ALTER</span> <span style="color:rgb(255,51,153);">TABLE</span>  0_value_addition_setup <span style="color:rgb(255,51,153);">ADD</span> <span style="color:rgb(255,51,153);">UNIQUE</span> (<span style="color:rgb(125,161,35);">`value_code`</span>);</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ALTER</span> <span style="color:rgb(255,51,153);">TABLE</span> <span style="color:rgb(125,161,35);">`database_name`</span>.<span style="color:rgb(125,161,35);">`table_name`</span> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ADD</span> COLUMN <span style="color:rgb(125,161,35);">`id`</span> <span style="color:rgb(0,153,204);">INT</span> <span style="color:rgb(255,51,153);">NOT</span> <span style="color:rgb(255,51,153);">NULL</span> <span style="color:rgb(255,51,153);">AUTO_INCREMENT</span> FIRST,</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ADD</span> <span style="color:rgb(255,51,153);">PRIMARY</span> <span style="color:rgb(255,51,153);">KEY</span> (<span style="color:rgb(125,161,35);">`id`</span>);</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ALTER</span> <span style="color:rgb(255,51,153);">TABLE</span> table_name</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ADD</span> <span style="color:rgb(255,51,153);">CONSTRAINT</span> UC_table_name <span style="color:rgb(255,51,153);">UNIQUE</span> (field1,field2);</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ALTER</span> <span style="color:rgb(255,51,153);">TABLE</span> MyTable <span style="color:rgb(255,51,153);">ADD</span> MyId <span style="color:rgb(0,153,204);">INT</span> <span style="color:rgb(255,51,153);">AUTO_INCREMENT</span> <span style="color:rgb(255,51,153);">PRIMARY</span> <span style="color:rgb(255,51,153);">KEY</span>;</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"> </div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;">제가 찿던 내용이 딱 눈에 띄네요.</div><div style="color:rgb(1,1,1);font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;background-color:rgb(250,250,250);padding:0px 6px;white-space:pre;line-height:15.6px;"><span style="color:rgb(255,51,153);">ALTER</span> <span style="color:rgb(255,51,153);">TABLE</span> TABLE_NAME <span style="color:rgb(255,51,153);">ADD</span> <span style="color:rgb(255,51,153);">CONSTRAINT</span> KEY_NAME <span style="color:rgb(255,51,153);">UNIQUE</span> (COL_NAME1, COL_NAME2, COL_NAME3)</div>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2020-03-23T11:42:18+09:00</dc:date>
</item>


<item>
<title>[MySQL] 데이터(자료)형 및 크기</title>
<link>http://extends.program1472.com/bbs/board.php?bo_table=TB_04&amp;amp;wr_id=9</link>
<description><![CDATA[<h4 style="text-align:right;margin:1.71429rem 0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"><span style="font-weight:normal;font-size:7pt;">출처 ::: <a href="https://blog.lael.be/post/115" style="font-family:'돋움', Dotum, Helvetica, sans-serif;font-size:12px;" rel="nofollow"><span style="font-size:7pt;">https://blog.lael.be/post/115</span></a></span></h4><h4 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"><br /></h4><h4 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">자료형이 왜 필요하나?</h4><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">먼저 자료형이 왜 필요하는지 부터 생각해보자.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);">컴퓨터 프로그램</span>은 프로그래머가 의도한 대로 동작한다.<br />이 때 <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);">같은 목적의 프로그램이라고 할지라도</span> 효율적으로 동작하는 것이 <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);">더 좋은 프로그램</span>이 된다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">“<span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,255);">컴퓨터 알고리즘(Computer Algorithm)</span>” 학문에서는 이를 평가(Performance Analysis)하기 위해서,<br />“<span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);">시간복잡도(time complexity)</span>“와 “<span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);">공간복잡도(space complexity)</span>“라는 개념을 사용한다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">즉, <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,255);">“더 작은 공간을 사용하면서” , </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,255);">“더 빠르게 처리할수 있는” </span>프로그램을 만들기 위해서 <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);"><strong style="margin:0px;padding:0px;border:0px;vertical-align:baseline;">데이터 자료형</strong></span>을 사용하는 것이다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);">작은 공간에 넣을수록</span> 연산(SELECT 등의 연산)이 <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,255);">빨라지고</span> 공간도 <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,255);">적게 차지한다</span>.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">다음의 <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);">자료형 목록</span>을 보면서 당신의 프로그램의 <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);">목적을 충분히 이룰 수 있는</span> <strong style="margin:0px;padding:0px;border:0px;vertical-align:baseline;"><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);">작은 자료형</span></strong>을 찾아보도록 하자.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">자료형에 관해 논의한 이 <a href="https://blog.lael.be/post/917" target="_blank" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(119,119,119);" rel="nofollow noreferrer noopener">https://blog.lael.be/post/917</a> 글도 한번 읽어보도록 하자.</p><hr style="background-color:rgb(204,204,204);border:0px;height:1px;margin:24px 0px 1.71429rem;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;font-size:14px;" /><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">TINYINT[(M)] [UNSIGNED] [ZEROFILL]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 자료형의 크기 : 1바이트(1Byte, 2^8 = 8bit)<br />- 범위 : -128 에서 127 (UNSIGNED 일 경우 0 에서 255)</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">SMALLINT[(M)] [UNSIGNED] [ZEROFILL]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 자료형의 크기 : 2바이트(2Byte, 2^16 = 16bit)<br />- 범위 : -32768 에서 32767 (UNSIGNED 일 경우 0 에서 65535)</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 자료형의 크기 : 3바이트(3Byte, 2^24 = 24bit)<br />- 범위 : -8388608 에서 8388607 (UNSIGNED 일 경우 0 에서 16777215)</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">INT[(M)] [UNSIGNED] [ZEROFILL]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 자료형의 크기 : 4바이트(4Byte, 2^32 = 32bit)<br />- 범위 : -2147483648 에서 2147483647 (UNSIGNED 일 경우 0 에서 4294967295)<br />- 주의 : 모든 연산은 “signed BIGINT” 로 이루어진다. 따라서 더하기 곱하기 등으로 “signed BIGINT” 의 범위를 벗어난다면 값이 틀려질 것이다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">BIGINT[(M)] [UNSIGNED] [ZEROFILL]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 자료형의 크기 : 8바이트(8Byte, 2^64 = 64bit)<br />- 범위 : -9223372036854775808 에서 9223372036854775807 (UNSIGNED 일 경우 0 에 18446744073709551615)</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">FLOAT[(M,D)] [ZEROFILL]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : -3.402823466E+38 에서 -1.175494351E-38, 0 그리고 1.175494351E-38 에서 3.402823466E+38<br />- 주의 : unsigned 를 설정할수 없다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">DOUBLE[(M,D)] [ZEROFILL]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : -1.7976931348623157E+308 에서 -2.2250738585072014E-308, 0 그리고 2.2250738585072014E-308 에서 1.7976931348623157E+308<br />- 주의 : unsigned 를 설정할수 없다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">REAL[(M,D)] [ZEROFILL]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : DOUBLE 과 동일</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">DATE</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : ‘1000-01-01’ 에서 ‘9999-12-31’<br />- 주의 : unsigned 를 설정할수 없다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">DATETIME</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : ‘1000-01-01 00:00:00’ 에서 ‘9999-12-31 23:59:59’</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">TIMESTAMP[(M)]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : ‘1970-01-01 00:00:00’ 에서 2037</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">CHAR(M) [BINARY]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 자료형의 크기 : char 필드의 CHARACTER SET 에 따라 가변적임. 예를들어 char(10) 이면서 utf4mb8 일 경우 고정 40Byte 사용.<br />- 범위 : 1 에서 255 글자<br />- 주의 : 고정길이로 길이가 작은 값이 입력되면 오른쪽에 스페이스로 채워져서 입력된다. BINARY 키워드가 주어지지 않을 경우 대소문자 구분없이 검색한다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">VARCHAR(M) [BINARY]</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 자료형의 크기 : varchar 필드의 CHARACTER SET 에 따라 가변적임. 예를들어 varchar(10) 이면서 utf4mb8 일 경우 최대(크기인덱스 1Byte + 데이터 40Byte 사용).<br />- 범위 : 1 에서 255 글자 (현재는 1에서 65535 글자 까지. 그러나 varchar(255) 이상을 사용하고 싶은 경우 text 자료형을 사용하여라)<br />- 주의 : BINARY 키워드가 주어지지 않을 경우 대소문자 구분없이 검색한다.<br />- TIP1 : 모든 데이터 값의 길이가 고정일 경우 char 가 varchar 보다 저장공간도 적게 차지하고 속도도 아주 약간 더 빠르다.<br />- TIP2 : 대부분의 상황에서 varchar 와 char 는 IN/OUT 이 동일하게 처리된다. 아무거나 써도 되지만 varchar 를 선택하기를 권장한다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">TINYTEXT</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : 최대 255 byte</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">TEXT</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 자료형의 크기 : 최대 65535 Byte (= 대략 64 KB)<br />- 범위 : 최대 65535 byte. <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,255);">utf8 기준(3바이트 문자)</span>으로 <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,128);">21844 글자 저장가능</span>.<br />- 허용크기 계산법 : 65536 = 2^16 = 2Byte 이다. 모든 text 값에는 반드시 이 크기지정 바이트가 붙는다. 따라서 한글의 경우 (65535-2)/3 글자 만큼 저장할 수 있다.</p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">MEDIUMTEXT</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : 최대 16777215 byte (= 대략 16MB)</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">LONGTEXT</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : 최대 4294967295 byte (= 대략 4GB)</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">ENUM(‘value1′,’value2’,…)</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : ‘value1’, ‘value2’, …, or NULL 만이 입력가능하다. 최대 65535 개의 다른 값이 들어갈수 있다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><h5 style="margin:1.71429rem 0px;padding:0px;border:0px;font-size:0.928571rem;vertical-align:baseline;clear:both;line-height:1.84615;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">SET(‘value1′,’value2’,…)</h5><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">- 범위 : ‘value1’, ‘value2’, …, or NULL 만이 입력가능하다. 최대 64 개의 다른 값이 들어갈수 있다.</p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);"> </p><hr style="background-color:rgb(204,204,204);border:0px;height:1px;margin:24px 0px 1.71429rem;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;font-size:14px;" /><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">참조 : <a href="https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html" target="_blank" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(119,119,119);" rel="nofollow noreferrer noopener">https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html</a></p><p style="margin-bottom:24px;border:0px;font-size:14px;vertical-align:baseline;line-height:1.71429;color:rgb(68,68,68);font-family:'Malgun Gothic', Helvetica, 'Apple SD Gothic Neo', Arial, sans-serif;background-color:rgb(255,255,255);">참조 : <a href="https://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html" target="_blank" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(119,119,119);" rel="nofollow noreferrer noopener">https://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html</a></p>]]></description>
<dc:creator>하나를하더라도최선을</dc:creator>
<dc:date>2020-03-03T18:52:56+09:00</dc:date>
</item>

</channel>
</rss>
