Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8723755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:41:50+00:00 2026-06-13T07:41:50+00:00

I am looking for query that I can use to add ten new boolean

  • 0

I am looking for query that I can use to add ten new boolean columns to existing table without effecting anything else in database. Also by default these boolean columns should be set to true as default.

Looking for best practices.

Edit

“Also by default these boolean columns should be set to true as default.”

Sorry I meant to say that for records already exists new column should have value set as true, there shouldn’t be any default value as I will set it myself.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:41:51+00:00Added an answer on June 13, 2026 at 7:41 am

    just add the columns via an ALTER statement:

    ALTER TABLE MyTable ADD MyColumn bit NULL
    

    or not nullable with a default value:

    ALTER TABLE MyTable ADD MyColumn bit NOT NULL default 1
    

    thats it for MSSQL.

    EDIT:

    if you want to add multiple columns at a time you can use:

    ALTER TABLE MyTable ADD MyCol1 bit NOT NULL DEFAULT 1, MyCol2 bit NULL
    GO
    

    the “go” completes the batch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a query that takes mostly consecutive days and groups them together
I am looking to create a SQL query that collects the results from multiple
I'm looking to perform a REGEX on a MongoDB find query that only finds
i am looking for an SQL query, that selects exactly rows ordered by date
I have a complex Query (Without any locking hints) that takes data from many
I'm looking for a cross-platform database engine that can handle databases up hundreds of
Hey all, I am looking for a way to query my database table only
I'm looking to query all databases mapped to a user, similar to Security >
Am looking for a query to sum values in a particular time duration say
I am looking at the query syntax . and i could not figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.