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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:42:18+00:00 2026-06-13T19:42:18+00:00

I am using SQL Server for my database. now there is table which has

  • 0

I am using SQL Server for my database. now there is table which has following columns.

PK_ID   FK_ID   Name   Description
1        5       ABC      ABCDE
2        7       EFG      EFT
3        8       XUZ      Xyz
4        11      TEF      TEF

Now by mistake i update some Fk_ID field with null value. Now I want to get back my all fk_id which is updated by null value. So is there any way to revert back fk_id’s which has value previously?

Can any one help me out to find out solution for the same?

  • 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-13T19:42:19+00:00Added an answer on June 13, 2026 at 7:42 pm

    To avoid this in the future, you may want to use a transaction to give you the option to roll back.

    For example

    BEGIN TRAN T1;
    UPDATE ImportantStuff SET ImportantValue = 1 WHERE SomeValue = 5
    

    You can then either commit if it looks good:

    COMMIT TRAN T1;
    

    Or rollback if it doesn’t

    ROLLBACK TRAN T1
    

    Of course, this is not a substitute for testing before you run a script against real data – but I have often used this during testing, rather than hoping for the best.

    Without a transaction, you will need to reset the data from a back up.

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

Sidebar

Related Questions

I have a SQL Server database with an Apartment table (which has columns FloorNum
I have a simple database table (SQL Server 2008 R2 Express), which has a
I am using SQL Server CE database and C# language. I have a table
I have a web application, which is using a SQL Server 2005 database. My
I'm using Microsoft SQL Server for my database. There is an ID column in
I have an EMPLOYEE table in a SQL Server 2008 database which stores information
I have a table in database called user which has following entries. Userid FirstName
I'm using a SQL Server database, I'm working on a real estate website. I
I am using a SQL Server database in my current project. I was watching
I'm using a SQL Server database in my program with Linq-to-SQL I'm using this

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.