- if there is no author with AuthorID = @authorID, the procedure will insert into the table thors a new row with @authorID, @authorName, @country, @sex, @yearOfBirth as values for its attributes.
For example, when we execute the insertAuthor procedure with input values as in the following statement, a new author with the corresponding values will be inserted into the table Authors:
exec insertAuthor
@authorID = 100,
@authorName = 'Guillaum Musso',
8 of 8
Paper No: 11
@country = 'France',
@sex = 'Male',
@yearOfBirth = 1975;
But when we run the following statement to execute the insertAuthor procedure, the command completed successfully but no row will be inserted into the table Authors because an author with AuthorID = 1 already exists in the table.
exec insertAuthor
@authorID = 1,
@authorName = 'David Lodge',
@country = 'United States'.
Close
+ 100%