[{"data":1,"prerenderedAt":127},["ShallowReactive",2],{"term-s\u002Fselect":3,"related-s\u002Fselect":109},{"id":4,"title":5,"acronym":6,"body":7,"category":89,"description":90,"difficulty":91,"extension":92,"letter":93,"meta":94,"navigation":95,"path":96,"related":97,"seo":103,"sitemap":104,"stem":107,"subcategory":6,"__hash__":108},"terms\u002Fterms\u002Fs\u002Fselect.md","SELECT",null,{"type":8,"value":9,"toc":83},"minimark",[10,15,19,23,26,30,72,76,79],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"SELECT is how you ask a database to give you data. It is the 'Read' in CRUD. You say SELECT and then tell it exactly what you want: which table, which columns, which rows. It is basically asking the database a question.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"SELECT is the SQL statement for querying data from one or more tables. It supports filtering (WHERE), joining tables (JOIN), sorting (ORDER BY), grouping (GROUP BY), limiting results (LIMIT), and aggregating data (COUNT, SUM, AVG). It is the most commonly used SQL statement.",[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","SELECT id, name, email\nFROM users\nWHERE active = true\nORDER BY created_at DESC\nLIMIT 10;\n","sql","",[38,39,40,48,54,60,66],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,47],{},"SELECT id, name, email\n",[41,49,51],{"class":43,"line":50},2,[41,52,53],{},"FROM users\n",[41,55,57],{"class":43,"line":56},3,[41,58,59],{},"WHERE active = true\n",[41,61,63],{"class":43,"line":62},4,[41,64,65],{},"ORDER BY created_at DESC\n",[41,67,69],{"class":43,"line":68},5,[41,70,71],{},"LIMIT 10;\n",[11,73,75],{"id":74},"when-youll-hear-this","When You'll Hear This",[16,77,78],{},"\"Write a SELECT query to get all active users.\" \u002F \"SELECT * is fine for debugging but bad for production.\"",[80,81,82],"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":84},[85,86,87,88],{"id":13,"depth":50,"text":14},{"id":21,"depth":50,"text":22},{"id":28,"depth":50,"text":29},{"id":74,"depth":50,"text":75},"database","SELECT is how you ask a database to give you data. It is the 'Read' in CRUD.","beginner","md","s",{},true,"\u002Fterms\u002Fs\u002Fselect",[98,99,100,101,102],"WHERE","JOIN","ORDER BY","LIMIT","CRUD",{"title":5,"description":90},{"changefreq":105,"priority":106},"weekly",0.7,"terms\u002Fs\u002Fselect","A0XiLhSXe11XIVV5wZGBnO2jU80ea7IRRCUXMQAW4yo",[110,114,118,121,124],{"title":102,"path":111,"acronym":112,"category":89,"difficulty":91,"description":113},"\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":99,"path":115,"acronym":6,"category":89,"difficulty":116,"description":117},"\u002Fterms\u002Fj\u002Fjoin","intermediate","JOIN combines rows from two tables based on a related column.",{"title":101,"path":119,"acronym":6,"category":89,"difficulty":91,"description":120},"\u002Fterms\u002Fl\u002Flimit","LIMIT caps how many rows a query returns. If your users table has 1 million rows, you do not want to load all of them at once.",{"title":100,"path":122,"acronym":6,"category":89,"difficulty":91,"description":123},"\u002Fterms\u002Fo\u002Forder-by","ORDER BY sorts your query results. Add DESC for newest first, ASC for oldest first.",{"title":98,"path":125,"acronym":6,"category":89,"difficulty":91,"description":126},"\u002Fterms\u002Fw\u002Fwhere","WHERE is how you filter which rows a query affects. Without WHERE, SELECT returns everything, UPDATE changes everything, DELETE deletes everything.",1776518309656]