[{"data":1,"prerenderedAt":132},["ShallowReactive",2],{"term-d\u002Fdelete":3,"related-d\u002Fdelete":115},{"id":4,"title":5,"acronym":6,"body":7,"category":96,"description":97,"difficulty":98,"extension":99,"letter":100,"meta":101,"navigation":65,"path":102,"related":103,"seo":109,"sitemap":110,"stem":113,"subcategory":6,"__hash__":114},"terms\u002Fterms\u002Fd\u002Fdelete.md","DELETE",null,{"type":8,"value":9,"toc":90},"minimark",[10,15,19,23,26,30,79,83,86],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"DELETE removes rows from a table. It is the 'Delete' in CRUD. Like UPDATE, you MUST use a WHERE clause — without it, you delete everything in the table. Always double-check before running DELETE in production.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"DELETE is the SQL statement for removing rows from a table. A WHERE clause filters which rows are deleted. Without WHERE, all rows are deleted (though the table structure remains). Foreign key constraints with ON DELETE CASCADE can cause cascading deletions in related tables.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- Be very careful!\nDELETE FROM sessions\nWHERE expires_at \u003C NOW();\n\n-- Nuclear option (without WHERE):\n-- DELETE FROM sessions;  -- DELETES EVERYTHING\n","sql","",[38,39,40,48,54,60,67,73],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,47],{},"-- Be very careful!\n",[41,49,51],{"class":43,"line":50},2,[41,52,53],{},"DELETE FROM sessions\n",[41,55,57],{"class":43,"line":56},3,[41,58,59],{},"WHERE expires_at \u003C NOW();\n",[41,61,63],{"class":43,"line":62},4,[41,64,66],{"emptyLinePlaceholder":65},true,"\n",[41,68,70],{"class":43,"line":69},5,[41,71,72],{},"-- Nuclear option (without WHERE):\n",[41,74,76],{"class":43,"line":75},6,[41,77,78],{},"-- DELETE FROM sessions;  -- DELETES EVERYTHING\n",[11,80,82],{"id":81},"when-youll-hear-this","When You'll Hear This",[16,84,85],{},"\"DELETE old sessions that expired more than 30 days ago.\" \u002F \"I ran DELETE without a WHERE clause on production.\"",[87,88,89],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":50,"depth":50,"links":91},[92,93,94,95],{"id":13,"depth":50,"text":14},{"id":21,"depth":50,"text":22},{"id":28,"depth":50,"text":29},{"id":81,"depth":50,"text":82},"database","DELETE removes rows from a table. It is the 'Delete' in CRUD. Like UPDATE, you MUST use a WHERE clause — without it, you delete everything in the table.","beginner","md","d",{},"\u002Fterms\u002Fd\u002Fdelete",[104,105,106,107,108],"SELECT","INSERT","UPDATE","WHERE","CRUD",{"title":5,"description":97},{"changefreq":111,"priority":112},"weekly",0.7,"terms\u002Fd\u002Fdelete","1lgZPEGd1tM-6Obsnktc8zhmOPkuJph2CKs1zl77CF0",[116,120,123,126,129],{"title":108,"path":117,"acronym":118,"category":96,"difficulty":98,"description":119},"\u002Fterms\u002Fc\u002Fcrud","Create, Read, Update, Delete","CRUD is the four things you can do to data: Create it, Read it, Update it, Delete it. Literally every app ever made is just CRUD in a trenchcoat.",{"title":105,"path":121,"acronym":6,"category":96,"difficulty":98,"description":122},"\u002Fterms\u002Fi\u002Finsert","INSERT is how you add new data to a database. It is the 'Create' in CRUD. You tell it which table, which columns, and what values to put in.",{"title":104,"path":124,"acronym":6,"category":96,"difficulty":98,"description":125},"\u002Fterms\u002Fs\u002Fselect","SELECT is how you ask a database to give you data. It is the 'Read' in CRUD.",{"title":106,"path":127,"acronym":6,"category":96,"difficulty":98,"description":128},"\u002Fterms\u002Fu\u002Fupdate","UPDATE changes existing data in a table. It is the 'Update' in CRUD.",{"title":107,"path":130,"acronym":6,"category":96,"difficulty":98,"description":131},"\u002Fterms\u002Fw\u002Fwhere","WHERE is how you filter which rows a query affects. Without WHERE, SELECT returns everything, UPDATE changes everything, DELETE deletes everything.",1776518271617]