Hello everyone im currently experiencing difficulty’s with One of my tasks any help would be greatly appreciated ive been stuck on this for 1 hour.
Create a stored procedure called Task35 that creates a calculated field named “Order Date”
for the Products table. Include necessary SQL statements in the query to specify the current
date as the Order Date for each of the products in the table. The query should display the
Product Name along with the Order Date of each product.
My current MS SQL code is:
ALTER PROCEDURE [dbo].[Task35]
AS
ALTER TABLE Products
ADD [orderdate] SMALLDATETIME DEFAULT GETDATE()
SELECT ProductName,orderdate
FROM Products
Thank you for taking the time to read this
-Ryfizzle
ALTER PROCEDURE Task35
AS
SELECT ProductName , GETDATE() AS Orderdate
FROM Products
what i was doing wrong was thinking of it as adding a new column , ive posted the ms-sql code into here so if anyone has trouble with a similar thing they can benefit from it.