C#, SQL Server, WCF, MVC and ASP .NET video tutorials for beginners http://www.youtube.com/user/kudvenkat/playlists In this video we will learn about triggers …



  1. As most of the people here is facing the same problem as me that after execution 'Column name or number of supplied values does not match table definition'.Please help us to explain this this

  2. Hello venkat
    you videos are very helpful..thank u so much for all videos..i am getting this error when i create trigger plz help me for resolving this issue ..
    i understand the error checked both the table columns and data type ..Column name or number of supplied values does not match table definition.

  3. I am getting error message on this video and the next one. Please help
    Part 43:
    CREATE TRIGGER tr_tblEmployeeTrigger_ForInsert
    ON tblEmployeeTrigger
    Declare @ID int
    Select @ID = ID from inserted

    Insert Into tblEmployeeAuditTrigger
    Values ('New employee with ID = ' + CAST(@ID as nvarchar(5)) + ' is added on ' + CAST(Getdate() as nvarchar(20)))
    Error: Msg 213, Level 16, State 1, Procedure tr_tblEmployeeTrigger_ForInsert, Line 9
    Column name or number of supplied values does not match table definition.

  4. Your all videos are really awesome and your explanation style is mind blowing !!!! Please carry on help us with the SQL SERVER and BI as well. Would be great help if you start with SSIS and all.

  5. So nice video. I really like it. I joyed your video every night. I also tell my Students. Ask them learn if "you want to become a professional programmer". You are number one!!!

  6. Thank you for awesome explanation, I want my son be like you means as knowledgable as you, now he's in 4th standard, will show your videos to him to know how to involve deeply in subject before presenting to audience, your mother is so lucky to had a great son. Happy Mothers day amma

  7. Hi Kudvenkat,
    Is there schedule or time events in MS SQL SERVER to achieve a feature like , to post newsletters and email at specific time set by user. MySql has this feature, I searched the web for sql server but cannot find this feature in sql server. Your help and suggestions will be highly appreciated.

    link for MySql is here . http://www.sitepoint.com/working-with-mysql-events/

  8. I don't know, I'm confused here! probably the syntax you're using is old? to the best of my knowledge, syntax should be:create trigger Name_of_trigger before/or/after ON Name-Of_table for each row begin/code of what you want the trigger to do here/endplease advise.as this is also for the dml

  9. Hello Venkat,
    what is the data type of Auditdata. i am receiving errors while creating triggers, it shows message that the column name or number of supplied values does not match table definition.

  10. thank you very much
    Sorry sir,but you can tell what is the data type of Auditdata.
    because when i want to execute the trigger SQL show me error message that the column name or number of supplied values does not match table definition.

  11. hi venket !!

    i have a question
    what about if we inserted more than 1 row into table how to get thous data into a trigger can you ??

  12. Hi Venkat

    Thanks for these excellent videos. I learnt a lot so for. I wish you had videos for SSRS, SSIS and T-SQL.

    In this video I create the following and get error. Could you please help me find the problem.

    Create Trigger tr_tblPeople_ForDelete
    On tblPeople
    For Delete
    Declare @DepartId int
    Select @DepartId = DepartId from deleted

    Insert into tblPeopleAudit

    Values ('An existing employee with Id =' + cast(@DepartId as nvarchar(20)) , 'is deleted at' + CAST(Getdate() as nvarchar(30)))

    insert into tblPeople values (6 ,'Sare', 3200, 'Female', 2)

    when I insert or delete values I get this error

    Msg 245, Level 16, State 1, Procedure tr_tblPeople_ForInsert, Line 10
    Conversion failed when converting the nvarchar value 'The new employee with Id =6' to data type int.

  13. Thanks for the videos venkat… am following all the videos and am looking for truncate command i could'nt find that please tell me reason is that command is not there in sql server 2005..

  14. Wow your explanations are so easy to understand…. thank you so much for all your videos they are amazingly helpful. : ) !

  15. Great video and excellent explanation. Thanks very much.
    Can u plz tell me ,how to fire a trigger after certain  period of time(ex after 2months) ?

  16. Hi  ,
    What happens when theinsert statement has multiple rows ?@id=select id from inserted will not work as the query will return multiple rows .
    How do we handle this situation ?

  17. My group and i have been watching your videos to help with our class project and it's been so much help. Thank you so much

  18. create Trigger tr_employee_Forinsert
    on employee
               declare @Id int
               select @Id= Id from inserted

    insert into employee2
    values('New Employee Id =' + cast(@Id as varchar(5))+'is added at' 
    +CAST(GETDATE()as varchar(20)))

    I have written this code but its showing error:
    Msg 213, Level 16, State 1, Procedure tr_employee_Forinsert, Line 9
    Column name or number of supplied values does not match table definition.

    I am not able to understand please tell me what is the behind this error.

  19. For some reason when I write the exact trigger as shown at 11:28 and run it I get the following error: "Msg 208, Level 16, State 6, Procedure tr_tblEmployee_ForInsert, Line 1
    Invalid object name 'tr_tblEmployee_ForInsert'." Any idea what is gone wrong. I created identical tblEmployee and tblEmployeeAudit tables but it doesn't go through like in the video?

Leave A Reply

Please enter your comment!
Please enter your name here