-- List of Categories with Name containing Meat
select * from categories
	where CategoryName like '%meat%';

-- Insert a Categories record with name Meat Substitutes and an appropriate description
insert into categories
	(CategoryName, Description)
	values ('Meat Substitute', 'Vegetarian and vegan meat-like products');

-- The following retrieves the CategoryID assigned, saving it in @myCategoryID
declare @myCategoryID int;
set @myCategoryID = @@IDENTITY;
print 'Category ID created was ' + convert(varchar, @myCategoryID);

-- List of Categories with Name containing Meat
select * from categories
	where CategoryName like '%meat%';

-- Add a product named Carrot Burger with Category of Meat Substite (i.e., the CategoryID in @myCategoryID)
insert into Products
	(ProductName, CategoryID)
	values ('Carrot Burger', @myCategoryID);

-- The following retrieves the ProductID assigned, saving it in @myProductID
declare @myProductID int;
set @myProductID = @@IDENTITY;
print 'Product ID created was ' + convert(varchar, @myProductID);

select * from Products
	where ProductID = @myProductID;

-- Change the name of this new product to Mighty Meaty Carrot and establish a QuantityPerUnit of Ten patties
update Products
	set ProductName = 'Mighty Meaty Carrot',
		QuantityPerUnit = 'Ten Patties'
	where ProductID = @myProductID;

select * from Products
	where ProductID = @myProductID;

-- Remove any records created
delete from Products
	where ProductID = @myProductID;
delete from Categories
	where CategoryID = @myCategoryID;

