We are going to insert two records into our authors table:
Author 1:
First name: Geoffrey
Last name: Chaucer
Author 2:
First name: William
Last Name: Shakespeare
- USE Library;
- GO
- INSERT INTO Authors
- (
- first_Name
- , last_Name
- )
- VALUES
- (
- ' Geoffrey'
- , 'Chaucer'
- );
- INSERT INTO Authors
- (
- first_Name
- , last_Name
- )
- VALUES
- (
- ' William'
- , 'Shakespeare'
- );
When executed, this query will insert two authors into our "Authors" table with the provided information.
Now, let's add some books to our "Books" table.
Book 1:
Title: The Cantebury Tales
Genre: Classic/Poetry
Description: A great collection of poems and stories.
Book 2:
Title: Macbeth
Genre: Classic/Play
Description: "Fair is foul, and foul is fair". - ( Quote Act I, Scene I).
- USE Library;
- GO
- INSERT INTO Books
- (
- title
- , genre
- , [description]
- )
- VALUES
- (
- 'The Cantebury Tales'
- , 'Classic/Poetry'
- , 'A great collection of poems and stories.'
- );
- INSERT INTO Books
- (
- title
- , genre
- , [description]
- )
- VALUES
- (
- 'Macbeth'
- , 'Classic/Play'
- , '"Fair is foul, and foul is fair". - ( Quote Act I, Scene I).'
- );
When executed, this query will insert two books into our "Books" table with the provided information.
No comments:
Post a Comment