A database has a view named MovieView.
Write a SQL announcement to delete the view named MovieView from the database. -
ANSDROP VIEW MovieView;
A database has a view named MovieView.
Write a SQL assertion to delete the view named MovieView from the database. - ANSDROP
VIEW MovieView;
The database incorporates a desk named Movie.
Write a SQL question to return all information from the Movie table without directly
referencing any column names - ANSSELECT *
FROM Movie;
The database carries a desk named Movie.
Write a SQL question to return all data from the Movie table without immediately referencing
any column names. - ANSSELECT *
FROM Movie;
The Member desk can have the following columns:
ID—nice integer
FirstName—variable-period string with up to a hundred characters
MiddleInitial—constant-length string with 1 individual
LastName—variable-duration string with as much as a hundred characters
DateOfBirth—date
AnnualPledge—advantageous decimal fee representing a price of up to $999,999, with 2
digits for cents
Write a SQL statement to create the Member table.
Do no longer upload any additional constraints to any column beyond what is stated. -
ANSCREATE TABLE Member (
ID INT UNSIGNED,
FirstName VARCHAR(one hundred),
MiddleInitial CHAR(1),
LastName VARCHAR(100),
DateOfBirth DATE,
AnnualPledge DECIMAL(8,2) UNSIGNED
);
The Member table will have the following columns:
ID—effective integer
FirstName—variable-duration string with up to a hundred characters
MiddleInitial—constant-period string with 1 individual
LastName—variable-length string with up to one hundred characters
, DateOfBirth—date
AnnualPledge—nice decimal fee representing a value of as much as $999,999, with 2 digits
for cents
Write a SQL assertion to create the Member table. - ANSCREATE TABLE Member(
ID INT UNSIGNED,
FirstName VARCHAR(one hundred),
MiddleInitial CHAR(1),
LastName VARCHAR(one hundred),
DateOfBirth DATE,
AnnualPledge DECIMAL(8,2) UNSIGNED
);
The Movie desk has the following columns:
ID - integer, primary key
Title - variable-duration string
Genre - variable-length string
RatingCode - variable-length string
Year - integer
The YearStats desk has the following columns:
Year - integer
TotalGross - bigint unsigned
Releases - integer
Write a SQL query to display both the Title and the TotalGross (if available) for all films.
Ensure your end result set returns the columns inside the order indicated. - ANSSELECT
Title, TotalGross
FROM Movie
LEFT JOIN YearStats
ON Movie.Year = YearStats.Year;
The Movie desk has the following columns:
ID—integer
Title—variable-period string
Genre—variable-length string
RatingCode—variable-duration string
Year—integer
Write a SQL declaration to regulate the Movie desk to make the ID column the number one
key. - ANSALTER TABLE Movie
ADD PRIMARY KEY (ID);
The Movie desk has the following columns:
ID—integer
Title—variable-duration string
Genre—variable-duration string
RatingCode—variable-duration string
Year—integer
Write a SQL declaration to alter the Movie table to make the ID column the number one key.
- ANSALTER TABLE Movie
ADD PRIMARY KEY (ID);