public inbox for [email protected]  
help / color / mirror / Atom feed
From: Gambhir Singh <[email protected]>
To: [email protected]
Subject: Adding New Column with default value.
Date: Mon, 28 Apr 2025 22:54:11 +0530
Message-ID: <CAHOGQfVmfJ5rpxfMSqJjTZGqN5ss-hdsCdTHsrxHAi2mUwWwmw@mail.gmail.com> (raw)

I got  request from app Team to  add new column to a table with following
specifications

1. With Not Null Constraint
2. With Default value 0

Row Count - 50 Billion

Please help me to understand
  a. DDL statement (alter table add column) will be followed by the DML
statement (Update)....Am I correct ?
  b. What would be size of the Table (I assuming it will be doubled)
  c. What is the best approach for this kind of activity.

Thanks & Regards
Gambhir Singh


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Adding New Column with default value.
  In-Reply-To: <CAHOGQfVmfJ5rpxfMSqJjTZGqN5ss-hdsCdTHsrxHAi2mUwWwmw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox