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 7408589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:56:34+00:00 2026-05-29T05:56:34+00:00

EDIT: Is there a way to check if the constraint already exists to determine

  • 0

EDIT: Is there a way to check if the constraint already exists to determine if it needs to be removed first?

I build a series of tables, and in two columns I set the default value to ‘True’ when new records are added.

It seems the constraint will be added, with the line of code noted below, but it does not create the default value of ‘True’ in the binding.

ISSUE:

I am trying to change the default value for an existing column in SQL Express 2008

ALTER TABLE [dbo].[tblLangtrTR] ADD  CONSTRAINT [DF_tblLangtrTR_displayRecord_1]  DEFAULT (N'True') FOR [displayRecord]

using the above code I get this error….

Msg 2714, Level 16, State 5, Line 2
There is already an object named ‘DF_tblLangtrTR_displayRecord_1’ in the database.
Msg 1750, Level 16, State 0, Line 2
Could not create constraint. See previous errors.

  • 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-05-29T05:56:34+00:00Added an answer on May 29, 2026 at 5:56 am
    IF EXISTS(SELECT *
              FROM   sys.default_constraints
              WHERE  name = 'DF_tblLangtrTR_displayRecord_1'
                     AND parent_object_id = object_id('dbo.tblLangtrTR'))
      ALTER TABLE dbo.tblLangtrTR DROP CONSTRAINT
      [DF_tblLangtrTR_displayRecord_1]
    
    ALTER TABLE dbo.tblLangtrTR ADD CONSTRAINT [DF_tblLangtrTR_displayRecord_1]
    DEFAULT (N'True') FOR [displayRecord]  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: There must be some way I can approach this without writing a whole
Is there a way to display and edit values in the PropertyGrid (and his
Is there a way to make a click-to-edit control in silverlight? I've got some
Is there a way to know if TAdoQuery in Edit state was changed? Assuming
Is there a way I can apply '+ to '( 1 2 3)? edit:
Is there a way to remove duplicate (key-value) pairs from NSDictionary ? EDIT: My
In IIS 7 is there a way to edit the forms authentication portion of
Out of curiousity, is there any way to edit an existing synonym? That is,
In other words, is there a way to rewind it to the beginning? EDIT
Is there any possible way to edit this code <asp:LoginName ID=LoginName1 runat=server style=top: 165px;

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.