Results 1 to 2 of 2

Thread: about auto increment

  1. #1
    Join Date
    May 2008
    Posts
    5

    about auto increment

    i hav doubt in sql.we having two tables one parent and child tables .in parent table we having the field stud_id primary key auto increament .if insert any data to the parent table to this id the value to be also insert in the child table. in child table the stud_id is used as foreign key.give the query.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You need to write an insert trigger on parent table to insert corresponding row in the child table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •