5
Reply

what is a magic table in sql server

    This is very simple and easy:
    The sample code is as follows:

    using System;
    using System.IO; //Namespaces needs for file Input/Output Operation
    namespace FILEIO
    {
    public partial class Form1 : Form
    {
    private void button1_Click(object sender, EventArgs e)
    {
    StreamWriter iSW = new StreamWriter(@"C:\Target.txt" ); // Open the target text file to write
    iSW.Write(textBox1.Text); // write the text to the file
    iSW.Close(); // close the stream writer
    }
    }
    }
    

    More important .NET Questions & Answer

    This is very simple and easy:
    The sample code is as follows:

    using System;
    using System.IO; //Namespaces needs for file Input/Output Operation
    namespace FILEIO
    {
    public partial class Form1 : Form
    {
    private void button1_Click(object sender, EventArgs e)
    {
    StreamWriter iSW = new StreamWriter(@"C:\Target.txt" ); // Open the target text file to write
    iSW.Write(textBox1.Text); // write the text to the file
    iSW.Close(); // close the stream writer
    }
    }
    }
    

    More important .NET Questions & Answer

    There are two Magic Tables in SQL Server:
    1. INSERTED:- This table is created when a trigger is created on a table for Insert and Update.
    1. DELETED:- This table is created when a trigger is created on a table for Update and Delete.
    More important .NET Questions & Answer

    The INSERTED and DELETED tables, popularly known as MAGIC TABLES, and update () and columns_updated() functions can be used to determine the changes being caused by the DML statements.
    Note that the Magic Table does not contain the information about the columns of the data-type text, ntext, or image. Attempting to access these columns will cause an error.

    The INSERTED and DELETED tables are called Magic tables which are maintained by sql server. When a table is updated, the affected row is inserted in the DELETED table and the new row is inserted in the INSERTED table before the updation process. When a row is inserted in a table the INSERTED table is populated and when a row is deleted from a table the DELETED table is populated.