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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:49:27+00:00 2026-06-09T22:49:27+00:00

I’m using a trigger concept when a row from a table is deleted the

  • 0

I’m using a trigger concept when a row from a table is deleted the same row is to be inserted into another table.. Now the problem is i am deleting the row from grid view using delete command field. when i delete the row i couldn’t get the values of the deleted row to make it store in another table. the row is getting inserted but it’s all empty.

Now i need to know how to copy the values from deleted row into another table for insertion.

require help as soon as possible

Thank you.

this is the trigger

No this is my trigger function.

CREATE TRIGGER tgrfortrash ON [dbo].[Proj_details] 
AFTER DELETE
AS
    declare @proj_id varchar(10);
    declare @proj_name varchar(100);
    declare @front_end varchar(15);
    declare @back_end varchar(15);
    declare @proj_path varchar(100);

    select @proj_id=d.Proj_id from deleted d;   
    select @proj_name=d.Proj_name from deleted d;   
    select @front_end=d.Front_end from deleted d;
    select @back_end=d.Back_end from deleted d;

insert into Trash_details
(Proj_id,Proj_name,Front_end,Back_end,Proj_path) 
    values(@proj_id,@proj_name,@front_end,@back_end,@proj_path);
  • 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-09T22:49:28+00:00Added an answer on June 9, 2026 at 10:49 pm

    You can make sue of magic table in you delete trigger and get the whole deleted row

    here is the statement for that

    SELECT * FROM deleted -- this statement in trigger return you deleted row 
    

    EDIT

    why you are using the variable for each value you can write it like this

     INSERT INTO Trash_details(Proj_id,Proj_name,Front_end,Back_end,Proj_path) 
           Select Proj_id,Proj_name,Front_end,Back_end,Proj_path From deleted
    

    there is no need to variables

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

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.