Question: compose the necessary SQL statements to do the following tasks. 1 . create the following database table: book ( isbn , title, author, numberOfPages, releaseDate

compose the necessary SQL statements to do the following tasks.
1. create the following database table: book (isbn, title, author, numberOfPages, releaseDate)
- Note: Do not create a database.
2. Apply the following attribute specifications:
- isbn: fixed-length string of 4 characters, primary key
- title: variable-length string up to 50 characters, cannot be NULL
- author: variable-length string up to 255 characters
- numberOfPages: a whole number
- releaseDate: a date value
- Note: use only these data types: INT, DATE, CHAR, VARCHAR
3. insert three records as follows:
- Record 1: insert the following values accross all attributes:
_ AAAA, The Beauty, John Doe, 100,1990-12-01
- Record 2: insert the following values for only attributes isbn, title, author, and releaseDate
_BBBB, Blue Sky, Richard Doe, 2010-08-20
- Record 3: insert the following values for only attributes isbn and title
_ CCCC, The Secret
4. create a table called "task4" from a SELECT statement. this SELECT statement should display all the records from table "book" that satisfy both of the following two conditions:
- the releaseDate is not null
- the last name of the author is Doe (case insensitive).
Notes:
- Do not include stand-alone SELECT statements, they tend to mess up the automated tests
- When commenting a line, always add a space after a "--", otherwise, you will get an error.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!