[{"data":1,"prerenderedAt":117},["ShallowReactive",2],{"term-d\u002Fdefault-value":3,"related-d\u002Fdefault-value":107},{"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":101,"sitemap":102,"stem":105,"subcategory":6,"__hash__":106},"terms\u002Fterms\u002Fd\u002Fdefault-value.md","Default Value",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",{},"A default value is what gets stored in a column when you do not provide one. Like 'created_at' defaulting to the current time — you never have to pass it in, the database fills it in for you automatically.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"A DEFAULT value is a column-level constraint that specifies a value to use when no explicit value is provided during an INSERT. Defaults can be literals (0, 'active'), expressions (NOW()), or functions. They reduce the need for application-level logic.",[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","CREATE TABLE tasks (\n  id SERIAL PRIMARY KEY,\n  status TEXT DEFAULT 'pending',\n  created_at TIMESTAMPTZ DEFAULT NOW()\n);\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],{},"CREATE TABLE tasks (\n",[41,49,51],{"class":43,"line":50},2,[41,52,53],{},"  id SERIAL PRIMARY KEY,\n",[41,55,57],{"class":43,"line":56},3,[41,58,59],{},"  status TEXT DEFAULT 'pending',\n",[41,61,63],{"class":43,"line":62},4,[41,64,65],{},"  created_at TIMESTAMPTZ DEFAULT NOW()\n",[41,67,69],{"class":43,"line":68},5,[41,70,71],{},");\n",[11,73,75],{"id":74},"when-youll-hear-this","When You'll Hear This",[16,77,78],{},"\"Set the status column to default to 'active'.\" \u002F \"The created_at column has a default of the current timestamp.\"",[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","A default value is what gets stored in a column when you do not provide one.","beginner","md","d",{},true,"\u002Fterms\u002Fd\u002Fdefault-value",[98,99,100],"Not Null","Column","Auto Increment",{"title":5,"description":90},{"changefreq":103,"priority":104},"weekly",0.7,"terms\u002Fd\u002Fdefault-value","cFSK7EWGLaytpD7wVGfnVhCE3MIUU0O8TMgRK5R4fJc",[108,111,114],{"title":100,"path":109,"acronym":6,"category":89,"difficulty":91,"description":110},"\u002Fterms\u002Fa\u002Fauto-increment","Auto increment means the database assigns the next ID number automatically every time you insert a row.",{"title":99,"path":112,"acronym":6,"category":89,"difficulty":91,"description":113},"\u002Fterms\u002Fc\u002Fcolumn","A column is a category of data in a table. If a table is a spreadsheet, columns are the headers: 'Name', 'Email', 'Age'.",{"title":98,"path":115,"acronym":6,"category":89,"difficulty":91,"description":116},"\u002Fterms\u002Fn\u002Fnot-null","NOT NULL is how you tell the database 'this field MUST have a value — you cannot leave it blank.",1776518273351]