SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE People ( Id int NOT NULL IDENTITY, FirstName varchar(100) NOT NULL, LastName varchar(100) NOT NULL ) -- ** Problem 1: -- Add a column, FavoriteColor (optional, not required, varchar(100)), to the previous table. -- Write the statement here: -- ** Problem 2: -- Insert the following names into the People table: -- Eric Dainty -- Eric Frolicker -- Eric Dancer -- Luke Powers -- Luke Masters -- Shirley Hoover -- Max Eagerson -- Write the statement here: -- ** Problem 3: -- Update all records in the People table so that FavoriteColor is 'Orange' -- Write the statement here: -- ** Problem 4: -- Write a query that finds all records where the last name ends with the letter "n". -- Write the statement here: -- ** Problem 5: -- Write a query to provide a list of all the FirstName values that are in the table, -- along with how many times they names are in there: -- Example results: -- FirstName Num -- Eric 3 -- Luke 2 -- Shirley 1 -- Max 1 -- Write the statement here: -- ** Problem 6: -- Modify the query for problem five to only show FirstName values that are in the table once. -- Example results: -- FirstName Num -- Shirley 1 -- Max 1 -- Write the statement here:

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear