I created two tables: Table1 has fields: author_id (uniqueidentifier), author_name (char). Table2 : book_name (char), author_id (the primary key from Table1). I inserted into Table1 a record that its author_id was generated by NEWID() function. After that, I inserted into Table2 a record which had author_id was the same as the record in Table1. To do that, I wrote down the value of author_id from Table1 and I carefully typed it into author_id (Table2). How could I do to make life easier. Thank U. |
|