CREATE TABLE AverageStudents
AS
(SELECT *
FROM StudentData
WHERE GPA > 3.0);
I keep getting the error
Incorrect syntax near the keyword 'AS'.
Does my simple code look alright to you? I really want a table (not a view, thanks for suggestion though).
Try this one -
SELECT *
INTO AverageStudents
FROM StudentData
WHERE GPA > 3.0
Or this -
CREATE VIEW AverageStudents
AS
SELECT *
FROM StudentData
WHERE GPA > 3.0
I think you're looking for a view:
CREATE VIEW AverageStudents AS
SELECT *
FROM StudentData
WHERE GPA > 3.0;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With