59.0k views
1 vote
Create a Movie table with the following columns ID-positive integer with maximum value of 50,000 Title-variable-length string with up to 50 characters Rating fixed-length string with 4 characters Release Date-date Budget-decimal value representing a cost of up to 999,999 dollars, with 2 digits for cents

User Natali
by
7.6k points

1 Answer

3 votes

Attached is the SQL code to create a Movie table with the specified columns and constraints:

The attached code is one that can be used to create a table named "Movie" with its columns:

In the code, there is an ID that is an integer that is the unique identifier for the movie. The ID must be greater than 0 and less than or equal to 50,000.

So, the PRIMARY KEY constraint is one that makes sure that the ID column is unique and that no two movies can have the same ID. The NOT NULL constraints ensure that the Title, Rating, and ReleaseDate columns are not NULL. The CHECK constraints makes sure that the ID, Budget, and Rating columns have valid values.

See text below

AB - Create Movie table Create a Movie table with the following columns: . ID - positive integer with maximum value of 50,000 . Title - variable-length string with up to 50 characters . Rating - fixed-length string with 4 characters . ReleaseDate - date . Budget - decimal value representing a cost of up to 999,999 dollars, with 2 digits for cents

Note: Your SQL code does not display any results in Develop mode

Create a Movie table with the following columns ID-positive integer with maximum value-example-1
User Roshit
by
7.8k points

No related questions found