{"id":302,"date":"2020-03-31T10:07:42","date_gmt":"2020-03-31T01:07:42","guid":{"rendered":"http:\/\/batmask.dothome.co.kr\/?p=302"},"modified":"2025-09-11T18:34:47","modified_gmt":"2025-09-11T09:34:47","slug":"db%ec%97%90-%eb%b0%9c%ea%b0%80%eb%9d%bd%eb%a7%8c-%eb%8b%b4%ea%b0%80%eb%b3%b4%ec%9e%90","status":"publish","type":"post","link":"http:\/\/batmask.net\/index.php\/2020\/03\/31\/302\/","title":{"rendered":"DB\uc5d0 \ubc1c\uac00\ub77d\ub9cc \ub2f4\uac00\ubcf4\uc790"},"content":{"rendered":"\n<p>\uac1c\ubc1c\uacbd\ub825\uc774 \ub300\ubd80\ubd84 \ubaa8\ubc14\uc77c \ud658\uacbd\uc774\ub2e4\ubcf4\ub2c8, \uc624\ub79c \uacbd\ub825\uc5d0\ub3c4 DB\ub97c \ub9cc\uc838\ubcf8\uc801\uc774 \ubcc4\ub85c \uc5c6\ub2e4. \uc548\ub4dc\ub85c\uc774\ub4dc \uc571\ub9cc \uac1c\ubc1c\ud574\ub3c4 sqlite\ub294 \uc4f8\ud150\ub370, \uc880 \uc2ec\uac01\ud558\ub124. \ub300\ud559\ub54c \ubc30\uc6e0\ub358 \uae30\uc5b5\uc744 \ub418\uc0b4\ub824\ubcf4\uba70 \uc544\uc8fc \uac04\ub2e8\ud55c \uc0ac\ud56d\ub9cc \uae30\ub85d\ud574\ubcf4\ub824\ud55c\ub2e4. \uc77c\ub2e8\uc740 \ub2e4\ub8e8\uae30\uc26c\uc6b4 sqlite3\ub9cc \uace0\ub824\ud55c\ub2e4. sqlite\ub97c \uacf5\ubd80\ud558\uae30 \uc88b\uc740 \uacf3\uc740 <a href=\"https:\/\/www.tutorialspoint.com\/sqlite\/index.htm\">tutorialspoint<\/a>. <\/p>\n\n\n\n<p>\uc5b4 \uba38\uc57c, \uc5b4\uc124\ud508 \ud29c\ud1a0\ub9ac\uc5bc \uc0ac\uc774\ud2b8\ubcf4\ub2e4 sqlite \uac1c\uca4c\ub294 \ud29c\ud1a0\ub9ac\uc5bc \uc0ac\uc774\ud2b8\uac00 \uc788\uc5c8\ub124.  <a href=\"https:\/\/www.sqlitetutorial.net\/\">https:\/\/www.sqlitetutorial.net\/<\/a>  \uadf8\ub0e5 \ube44\uad50\ub300\uc0c1\uc774 \uc5c6\ub2e4. \ucd5c\uace0\ub77c\uc11c \uc0b4\uc9dd \ucd94\uac00\ud568 \u314b <\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">DB \uc0dd\uc131<\/h3>\n\n\n\n<p>sqlite3\ub97c \ubc1b\uc544 \uc124\uce58\ud588\ub2e4\uba74, \ub2e4\uc74c\uacfc \uac19\uc774 \uc0dd\uc131\ud560 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>$sqlite3 DatabaseName.db<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ADBAC7\">$sqlite3 DatabaseName.db<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ub530\ub85c \ub2e4\uc6b4\ub85c\ub4dc\ubc1b\uc9c0 \uc54a\uace0, python\uc5d0 \uae30\ubcf8 \ub0b4\uc7a5\ub41c sqlite3\ubaa8\ub4c8\uc744 \uc4f4\ub2e4\uba74, connect()\uc2dc\uc5d0 DB\uac00 \uc5c6\uc73c\uba74 \uc0dd\uc131\ud558\uac8c \ub41c\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>import sqlite3\n\nconn = sqlite3.connect(\"employee.db\")<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">import<\/span><span style=\"color: #ADBAC7\"> sqlite3<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">conn <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> sqlite3.connect(<\/span><span style=\"color: #96D0FF\">&quot;employee.db&quot;<\/span><span style=\"color: #ADBAC7\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\uc2a4\ud0a4\ub9c8(Schema)<\/h3>\n\n\n\n<p>\uad00\uacc4\ud615 DB \uacf5\ubd80\ud560 \ub54c \uae30\uc5b5\uc744 \ub418\uc0b4\ub824\ubcf4\uba74 \uc774\uac8c \uc804\ubd80\ub2e4. \uc2a4\ud0a4\ub9c8\ub780 DB\uac00 \uc5b4\ub5bb\uac8c \uc0dd\uacbc\ub294\uc9c0 \uc815\uc758\ud558\ub294 \uac83\uc778\ub370, \ud14c\uc774\ube14\ub4e4\uc774 \uc5b4\ub5a4 \ud544\ub4dc\ub85c \uc774\ub8e8\uc5b4\uc9c0\uace0 \uac01 \ud14c\uc774\ube14\ub4e4\uc758 \uad00\uacc4\ub098 \uc81c\uc57d\uc0ac\ud56d\ub4f1\uc744 \uba85\uc2dc\ud558\ub294 \uac83\uc774\ub2e4. \uad00\uacc4\ud615 DB\ub294 \uc785\ucd9c\ub825\uc744 \uace0\ub824\ud574\uc11c \uc774 \uc2a4\ud0a4\ub9c8\ub97c \uc798\uc9dc\uba74 \ub561. \ud06c\uace0 \ubcf5\uc7a1\ud55c DB\ub97c \ub2e4\ub8f0 \uc77c\uc740 \uac70\uc758 \uc5c6\uc744 \uac83\uc774\uae30 \ub54c\ubb38\uc5d0, \ud14c\uc774\ube14\uc744 \uc0dd\uc131\ud558\ub294 SQL\uc815\ub3c4\ub9cc \uc54c\uba74 \ub420\uac70 \uac19\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud14c\uc774\ube14 \uc0dd\uc131\uacfc \uc0ad\uc81c<\/h3>\n\n\n\n<p>\uac1c\ubc1c\uc790 \uae30\uc900\uc73c\ub85c \ud14c\uc774\ube14\uc744 \uc0dd\uc131\ud558\ub294 SQL\ubb38\uc774 \ubc14\ub85c \uc2a4\ud0a4\ub9c8\ub97c \uc815\uc758\ud558\ub294 \uacf3\uc774\ub2e4. <a href=\"http:\/\/dbdiagram.io\">dbdiagram.io<\/a> \ub780 \uc0ac\uc774\ud2b8\uc5d0 \uac00\ubcf4\uba74, \uc2a4\ud0a4\ub9c8 \ub2e4\uc774\uc5b4\uadf8\ub7a8\uc744 \ub9cc\ub4e4\uc5b4\ubcfc \uc218 \uc788\ub2e4. \uac04\ub2e8\ud55c \uac8c\uc2dc\ud310\uc744 \uc608\ub85c \ub2e4\uc74c\uacfc \uac19\uc774 \uadf8\ub824\ubcf4\uc558\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"509\" src=\"http:\/\/batmask.dothome.co.kr\/wordpress\/wp-content\/uploads\/2020\/03\/Untitled.png\" alt=\"\" class=\"wp-image-304\" srcset=\"http:\/\/batmask.net\/wordpress\/wp-content\/uploads\/2020\/03\/Untitled.png 630w, http:\/\/batmask.net\/wordpress\/wp-content\/uploads\/2020\/03\/Untitled-300x242.png 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>\ud574\ub2f9 \uc0ac\uc774\ud2b8\uc5d0\uc11c mysql\uc774\ub098 postgresql \ub4f1\uc758 SQL\ubb38\uc744 \ub9cc\ub4e4\uc5b4\uc8fc\ub294 \uae30\ub2a5\ub3c4 \uc788\uc73c\ub2c8 \ucc38\uace0. \uc704 \ub2e4\uc774\uc5b4\uadf8\ub7a8\uc744 \uae30\ubc18\uc73c\ub85c sqlite\uc5d0 \ub9de\uac8c SQL\ubb38\uc744 \ub9cc\ub4e4\uc5b4\ubcf4\uc790.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>CREATE TABLE IF NOT EXISTS users (\n        id INTEGER PRIMARY KEY AUTOINCREMENT,\n        name TEXT NOT NULL,\n        age INTEGER,\n        nationality TEXT\n    );\n\nCREATE TABLE IF NOT EXISTS posts (\n        id INTEGER PRIMARY KEY AUTOINCREMENT,\n        title TEXT NOT NULL,\n        description TEXT NOT NULL,\n        user_id INTEGER NOT NULL,\n        FOREIGN KEY (user_id) REFERENCES users (id)\n    );\n\nCREATE TABLE IF NOT EXISTS comments (\n        id INTEGER PRIMARY KEY AUTOINCREMENT,\n        text TEXT NOT NULL,\n        user_id INTEGER NOT NULL,\n        post_id INTEGER NOT NULL,\n        FOREIGN KEY (user_id) REFERENCES users (id),\n         FOREIGN KEY (post_id) REFERENCES posts (id)\n    );<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">CREATE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">TABLE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">IF<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">EXISTS<\/span><span style=\"color: #ADBAC7\"> users (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        id <\/span><span style=\"color: #F47067\">INTEGER<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">PRIMARY KEY<\/span><span style=\"color: #ADBAC7\"> AUTOINCREMENT,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">name<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">TEXT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT NULL<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        age <\/span><span style=\"color: #F47067\">INTEGER<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        nationality <\/span><span style=\"color: #F47067\">TEXT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    );<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">CREATE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">TABLE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">IF<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">EXISTS<\/span><span style=\"color: #ADBAC7\"> posts (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        id <\/span><span style=\"color: #F47067\">INTEGER<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">PRIMARY KEY<\/span><span style=\"color: #ADBAC7\"> AUTOINCREMENT,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        title <\/span><span style=\"color: #F47067\">TEXT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT NULL<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">description<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">TEXT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT NULL<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        user_id <\/span><span style=\"color: #F47067\">INTEGER<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT NULL<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">FOREIGN KEY<\/span><span style=\"color: #ADBAC7\"> (user_id) <\/span><span style=\"color: #F47067\">REFERENCES<\/span><span style=\"color: #ADBAC7\"> users (id)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    );<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">CREATE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">TABLE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">IF<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">EXISTS<\/span><span style=\"color: #ADBAC7\"> comments (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        id <\/span><span style=\"color: #F47067\">INTEGER<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">PRIMARY KEY<\/span><span style=\"color: #ADBAC7\"> AUTOINCREMENT,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">text<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">TEXT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT NULL<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        user_id <\/span><span style=\"color: #F47067\">INTEGER<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT NULL<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        post_id <\/span><span style=\"color: #F47067\">INTEGER<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">NOT NULL<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">FOREIGN KEY<\/span><span style=\"color: #ADBAC7\"> (user_id) <\/span><span style=\"color: #F47067\">REFERENCES<\/span><span style=\"color: #ADBAC7\"> users (id),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">         <\/span><span style=\"color: #F47067\">FOREIGN KEY<\/span><span style=\"color: #ADBAC7\"> (post_id) <\/span><span style=\"color: #F47067\">REFERENCES<\/span><span style=\"color: #ADBAC7\"> posts (id)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    );<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ud558\ub098\uc758 SQL\ubb38 \ub4a4\uc5d0 \uc138\ubbf8\ucf5c\ub860\uc774 \ubd99\ub294\uac78 \uc8fc\uc758\ud558\uc790. CREATE\ubb38\uc5d0\uc11c &#8220;IF NOT EXISTS&#8221;\ub97c \uc368\uc11c \ud14c\uc774\ube14\uc774 \uc5c6\ub294\uacbd\uc6b0\ub9cc \ub9cc\ub4e4\ub3c4\ub85d \ud588\ub2e4. AUTOINCREMENT\ub294 \uc778\ub371\uc2a4\uac00 \uc790\ub3d9\uc73c\ub85c \ud558\ub098\uc529 \uc99d\uac00\ud558\uba70 \uc0dd\uc131\ub418\ub294\uac78 \ub9d0\ud55c\ub2e4. \ub098\uc911\uc5d0 INSERT\uc2dc\uc5d0 \ub530\ub85c \uac12\uc744 \uc785\ub825\ud560 \ud544\uc694\uac00 \uc5c6\ub2e4. \ud14c\uc774\ube14\uac04\uc758 \uad00\uacc4\ub294 \uc678\ub798\ud0a4\ub97c \uc815\uc758\ud558\ub294 FOREIGN KEY \ub97c \uc0ac\uc6a9\ud588\ub2e4. <\/p>\n\n\n\n<p> NOT NULL, PRIMARY KEY\ub4f1\uc740 Constraints\ub77c\uace0 \ud55c\ub2e4. <\/p>\n\n\n\n<p>\ud14c\uc774\ube14\uc758 \uc0ad\uc81c\ub294 \uc27d\ub2e4. DROP\uc744 \uc774\uc6a9\ud558\uba74 \ub41c\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>DROP TABLE users;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">DROP<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">TABLE<\/span><span style=\"color: #ADBAC7\"> users;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">CRUD : create, read, update, delete<\/h3>\n\n\n\n<p>\ub370\uc774\ud130\ubca0\uc774\uc2a4\ub294 CRUD\ub77c\uace0 \ubd88\ub9ac\ub294 4\uac00\uc9c0 \uae30\ub2a5, create, read, update, delete\ub97c \uad6c\ud604\ud558\uace0 \ucc98\ub9ac\ud574\uc57c\ud55c\ub2e4. SQL Query\ubb38\uc73c\ub85c\ub294 \uac01\uac01 <strong>INSERT, SELECT, UPDATE, DELETE<\/strong> \uac00 \ud574\ub2f9 \uba85\ub839\ubb38\uc774\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">INSERT<\/h3>\n\n\n\n<p>\ub370\uc774\ud130\ub97c \ucd94\uac00\ud558\ub294 INSERT\ubb38\uc758 \ubb38\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<p class=\"has-adbac-7-color has-text-color has-875-rem-font-size\">INSERT INTO TABLE_NAME [(column1, column2, column3,&#8230;columnN)]  <br>VALUES (value1, value2, value3,&#8230;valueN);<\/p>\n\n\n\n<p>\uc55e\uc5d0\uc11c \uc0dd\uc131\ud55c users \ud14c\uc774\ube14\uc5d0 \uc801\uc6a9\ud574\ubcf4\uba74 \ub2e4\uc74c\uacfc \uac19\uc774 \uc4f8 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>INSERT INTO users (name, age, nationality) VALUES (\"John\", 29, \"Korea\");<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">INSERT INTO<\/span><span style=\"color: #ADBAC7\"> users (<\/span><span style=\"color: #F47067\">name<\/span><span style=\"color: #ADBAC7\">, age, nationality) <\/span><span style=\"color: #F47067\">VALUES<\/span><span style=\"color: #ADBAC7\"> (<\/span><span style=\"color: #96D0FF\">&quot;John&quot;<\/span><span style=\"color: #ADBAC7\">, <\/span><span style=\"color: #6CB6FF\">29<\/span><span style=\"color: #ADBAC7\">, <\/span><span style=\"color: #96D0FF\">&quot;Korea&quot;<\/span><span style=\"color: #ADBAC7\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">SELECT <\/h3>\n\n\n\n<p>\ub370\uc774\ud130\ub97c \uc77d\uc5b4\uc624\ub294\ub370\uc5d0\ub294 SELECT\ubb38\uc774 \uc4f0\uc778\ub2e4. \uc804\uccb4 \ub370\uc774\ud130\uc5d0\uc11c \ud544\uc694\ud55c \uc815\ubcf4\ub4e4\ub9cc \uac00\uc838\uc624\ub294 \ubc29\ubc95\uc740 \ub54c\ub85c\ub294 \ub9e4\uc6b0 \ubcf5\uc7a1\ud55c \ub17c\ub9ac\uad6c\uc870\ub97c \uac00\uc9c0\uba70 \uc5b4\ub824\uc6b8 \uc218 \uc788\ub2e4. \uc5b4\ub824\uc6b4\uac74 \uc77c\ub2e8 \ubbf8\ub904\ub450\uace0, \uac00\uc7a5 \uae30\ubcf8\uc801\uc778 \uac83\ub9cc \ub2e4\ub8e8\uaca0\ub2e4. <\/p>\n\n\n\n<p>SELECT\ub294 \uae30\ubcf8\uc801\uc73c\ub85c \ud14c\uc774\ube14\uc5d0\uc11c \uc6d0\ud558\ub294 column\ub4e4\ub9cc &#8216;\uace8\ub77c&#8217;\uc624\ub294 \uba85\ub839\uc5b4\uc774\ub2e4. \uadf8 \ubb38\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<p class=\"has-very-light-gray-background-color has-background\"><code>SELECT column1, column2, columnN FROM table_name;<\/code><\/p>\n\n\n\n<p>\uc55e\uc5d0\uc11c \uc0dd\uc131\ud588\ub358 \ud14c\uc774\ube14\uc5d0 \uc801\uc6a9\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\uc774 \uc0ac\uc6a9\ub41c\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SELECT title, description FROM posts;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">SELECT<\/span><span style=\"color: #ADBAC7\"> title, <\/span><span style=\"color: #F47067\">description<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">FROM<\/span><span style=\"color: #ADBAC7\"> posts;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ubaa8\ub4e0 \uceec\ub7fc\uc744 \uac00\uc838\uc624\ub294 \uacbd\uc6b0, &#8216;*&#8217;\ub97c \uc4f8 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SELECT * FROM posts;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">SELECT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">*<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">FROM<\/span><span style=\"color: #ADBAC7\"> posts;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\uc774\uac83\ub9cc\uc73c\ub85c\ub294 \ub370\uc774\ud130\ub97c \ud2b9\uc815\ud558\uae30\uc5d4 \ubd80\uc871\ud558\ub2e4. SELECT\ub85c column\uc744 \ud544\ud130\ub9c1 \ud588\ub2e4\uba74, \ub4a4\uc5d0 WHERE \ubb38\uc744 \uc0ac\uc6a9\ud558\uc5ec row\uc5d0 \uc870\uac74\uc744 \uac78\uc5b4 \ub370\uc774\ud130\ub97c \ud544\ud130\ub9c1\ud574\uc900\ub2e4.<\/p>\n\n\n\n<p class=\"has-very-light-gray-background-color has-background\"><code>SELECT column1, column2, columnN  FROM table_name WHERE [condition]<\/code><\/p>\n\n\n\n<p>\uc55e\uc5d0\uc11c \ub9cc\ub4e0 \ud14c\uc774\ube14\uc5d0 \uc801\uc6a9\ud574 \uc608\ub97c\ub4e4\uba74 \ub2e4\uc74c\uacfc \uac19\uc774 \uc4f8 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SELECT name, age FROM users WHERE age > 30;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">SELECT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">name<\/span><span style=\"color: #ADBAC7\">, age <\/span><span style=\"color: #F47067\">FROM<\/span><span style=\"color: #ADBAC7\"> users <\/span><span style=\"color: #F47067\">WHERE<\/span><span style=\"color: #ADBAC7\"> age <\/span><span style=\"color: #F47067\">&gt;<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #6CB6FF\">30<\/span><span style=\"color: #ADBAC7\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>WHERE\ubb38\uc5d0 \ub17c\ub9ac\uc5f0\uc0b0\ub9cc \uc624\ub294\uac74 \uc544\ub2c8\ub2e4. LIKE\uc5f0\uc0b0\uc790\ub294 \uc815\uaddc\ud45c\ud604\uc2dd \ub9e4\uce6d\uacfc \uc720\uc0ac\ud558\ub2e4. percent(%), under scorer( _ ) \ub450\uac1c\uc758 \ubb38\uc790\uac00 \uc0ac\uc6a9\ub41c\ub2e4. &#8216;_&#8217; \ub294 \ud558\ub098\uc758 \ubb38\uc790, &#8216;%&#8217;\ub294 \uba87\uac1c\uc758 \ubb38\uc790\uac00 \uc640\ub3c4 \uc0c1\uad00\uc5c6\uc744 \ub54c(0\uac1c \ud3ec\ud568) \uc0ac\uc6a9\ub41c\ub2e4. \uc0ac\uc6a9\uc608\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>-- 'J'\ub85c \uc2dc\uc791\ud558\ub294 \ubaa8\ub4e0 \uc774\ub984 \uac00\uc838\uc624\uae30\nSELECT * FROM users WHERE name LIKE 'J%'\n-- 20\ub300\ub9cc \uac00\uc838\uc624\uae30. 200\uc740 \uc548\ub41c\ub2e4. \uc2e4\uc81c\ub860 \uc5c6\uaca0\uc9c0\ub9cc.\nSELECT * FROM users WHERE age LIKE '2_'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #768390\">-- &#39;J&#39;\ub85c \uc2dc\uc791\ud558\ub294 \ubaa8\ub4e0 \uc774\ub984 \uac00\uc838\uc624\uae30<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">SELECT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">*<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">FROM<\/span><span style=\"color: #ADBAC7\"> users <\/span><span style=\"color: #F47067\">WHERE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">name<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">LIKE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #96D0FF\">&#39;J%&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #768390\">-- 20\ub300\ub9cc \uac00\uc838\uc624\uae30. 200\uc740 \uc548\ub41c\ub2e4. \uc2e4\uc81c\ub860 \uc5c6\uaca0\uc9c0\ub9cc.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">SELECT<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">*<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">FROM<\/span><span style=\"color: #ADBAC7\"> users <\/span><span style=\"color: #F47067\">WHERE<\/span><span style=\"color: #ADBAC7\"> age <\/span><span style=\"color: #F47067\">LIKE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #96D0FF\">&#39;2_&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"> UPDATE<\/h3>\n\n\n\n<p>\uc774\uc804\uc5d0 INSERT\ub418\uc5b4\uc788\ub294 \ub0b4\uc6a9\uc744 \ubcc0\uacbd\ud558\ub294 \uacbd\uc6b0 \uc0ac\uc6a9\ud558\ub294 \uba85\ub839\ubb38\uc774\ub2e4. \ud615\uc2dd\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<p class=\"has-very-light-gray-background-color has-background\"><code>UPDATE table_name<br> SET column1 = value1, column2 = value2\u2026., columnN = valueN<br> WHERE [condition];<\/code><\/p>\n\n\n\n<p>\uc55e\uc5d0\uc11c \uc0dd\uc131\ud55c \ud14c\uc774\ube14\ub85c \uc608\ub97c\ub4e4\uba74 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>UPDATE posts SET description=\" useless post \" WHERE id=3;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">UPDATE<\/span><span style=\"color: #ADBAC7\"> posts <\/span><span style=\"color: #F47067\">SET<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">description=<\/span><span style=\"color: #96D0FF\">&quot; useless post &quot;<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">WHERE<\/span><span style=\"color: #ADBAC7\"> id<\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #6CB6FF\">3<\/span><span style=\"color: #ADBAC7\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">DELETE<\/h3>\n\n\n\n<p>\uc0ad\uc81c\ub3c4 UPDATE\uc640 \ube44\uc2b7\ud558\ub2e4.<\/p>\n\n\n\n<p class=\"has-very-light-gray-background-color has-background\"><code>DELETE FROM table_name WHERE [condition];<\/code><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>DELETE FROM comments WHERE id=2;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">DELETE<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">FROM<\/span><span style=\"color: #ADBAC7\"> comments <\/span><span style=\"color: #F47067\">WHERE<\/span><span style=\"color: #ADBAC7\"> id<\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #6CB6FF\">2<\/span><span style=\"color: #ADBAC7\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">JOIN<\/h3>\n\n\n\n<p>\uc5ec\ub7ec\uac1c\uc758 \ud14c\uc774\ube14\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uac00\uc838\uc624\ub294 \uacbd\uc6b0, SELECT\ubb38\uc5d0\uc11c \ud14c\uc774\ube14\uc744 \ub098\uc5f4\ud558\uc5ec \uac01\uac01 \uac00\uc838\uc62c \uc218\ub3c4 \uc788\uc9c0\ub9cc, JOIN\uc5f0\uc0b0\uc744 \uc0ac\uc6a9\ud560 \uc218\ub3c4 \uc788\ub2e4. JOIN\uc774\ub780 \ud14c\uc774\ube14\uac04 \uc9d1\ud569\uc5f0\uc0b0\uc744 \ud1b5\ud574 \uc0c8\ub85c\uc6b4 \ud14c\uc774\ube14\uc744 \ub9cc\ub4e0\ub2e4\uace0 \uc0dd\uac01\ud558\uba74\ub41c\ub2e4. INNER JOIN, OUTER JOIN, NATURAL JOIN\ub4f1\ub4f1\uc774 \uc788\ub294\ub370, \ucc38\uace0\ud560 \uc218 \uc788\ub294 \ub9c1\ud06c\ub9cc \ub2ec\uc544\ub454\ub2e4. <\/p>\n\n\n\n<p><a href=\"https:\/\/www.w3schools.com\/sql\/sql_join.asp\">https:\/\/www.w3schools.com\/sql\/sql_join.asp<\/a> :  W3 Scools tutorial   <\/p>\n\n\n\n<p> <a href=\"https:\/\/futurists.tistory.com\/17\">https:\/\/futurists.tistory.com\/17<\/a>  : sql join\uc744 \uad6c\uae00\ub9c1\ud558\uba74 \uc81c\uc77c\ucc98\uc74c \ub098\uc624\ub294 \ub9c1\ud06c\uc778\ub370, \uaf64 \uc0c1\uc138\ud788 \uc124\uba85\ud574\ub1a8\ub2e4. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uac1c\ubc1c\uacbd\ub825\uc774 \ub300\ubd80\ubd84 \ubaa8\ubc14\uc77c \ud658\uacbd\uc774\ub2e4\ubcf4\ub2c8, \uc624\ub79c \uacbd\ub825\uc5d0\ub3c4 DB\ub97c \ub9cc\uc838\ubcf8\uc801\uc774 \ubcc4\ub85c \uc5c6\ub2e4. \uc548\ub4dc\ub85c\uc774\ub4dc \uc571\ub9cc \uac1c\ubc1c\ud574\ub3c4 sqlite\ub294 \uc4f8\ud150\ub370, \uc880 \uc2ec\uac01\ud558\ub124. \ub300\ud559\ub54c \ubc30\uc6e0\ub358 \uae30\uc5b5\uc744 \ub418\uc0b4\ub824\ubcf4\uba70 \uc544\uc8fc \uac04\ub2e8\ud55c \uc0ac\ud56d\ub9cc \uae30\ub85d\ud574\ubcf4\ub824\ud55c\ub2e4. \uc77c\ub2e8\uc740 \ub2e4\ub8e8\uae30\uc26c\uc6b4 sqlite3\ub9cc \uace0\ub824\ud55c\ub2e4. sqlite\ub97c \uacf5\ubd80\ud558\uae30 \uc88b\uc740 \uacf3\uc740 tutorialspoint. \uc5b4 \uba38\uc57c, \uc5b4\uc124\ud508 \ud29c\ud1a0\ub9ac\uc5bc \uc0ac\uc774\ud2b8\ubcf4\ub2e4 sqlite \uac1c\uca4c\ub294 \ud29c\ud1a0\ub9ac\uc5bc \uc0ac\uc774\ud2b8\uac00 \uc788\uc5c8\ub124. https:\/\/www.sqlitetutorial.net\/ \uadf8\ub0e5 \ube44\uad50\ub300\uc0c1\uc774 \uc5c6\ub2e4. \ucd5c\uace0\ub77c\uc11c \uc0b4\uc9dd <a href=\"http:\/\/batmask.net\/index.php\/2020\/03\/31\/302\/\" class=\"btn btn-link continue-link\">\ub354 \uc77d\uae30<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,24],"tags":[102,63,103,137],"class_list":["post-302","post","type-post","status-publish","format-standard","hentry","category-etc","category-note4reference","tag-basic","tag-sql","tag-sqlite","tag-database-kr"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/comments?post=302"}],"version-history":[{"count":10,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/302\/revisions"}],"predecessor-version":[{"id":3443,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/302\/revisions\/3443"}],"wp:attachment":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/media?parent=302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/categories?post=302"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/tags?post=302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}