-
Tom Cooper 8,436 Reputation points
2021-06-21T15:26:59.057+00:00 Don't use quotes, use brackets, that is
ALTER DATABASE [dbname]Tom
2 additional answers
Sort by: Most helpful
-
Mas 1 Reputation point
2022-11-19T02:36:25.47+00:00 Can anyone tell me when I run this nothing happens?
CREATE TABLE movie_data (
id SERIAL
Movie VARCHAR (100),
Title VARCHAR (100),
Release_date VARCHAR (100),
Wikipedia_URL VARCHAR (100),
Genre VARCHAR (50),
Director VARCHAR (50),
Cast_1 VARCHAR (100),
Cast_2 VARCHAR (100),
Cast_3 VARCHAR (100),
Cast_4 VARCHAR (100),
Cat_5 VARCHAR (100),
Budget MONEY (50),
Revenue MONEY (50),
Primary Key (id)
)Tom Cooper 8,436 Reputation points2022-11-19T04:26:25.81+00:00 This is a Microsoft SQL Server forum. If you are using a different database you should ask your question on a forum for that database.
If you are using SQL Server, then SERIAL is not a valid datatype and the MONEY datatype cannot specify as length. So in SQL Server you would probably want something likeCREATE TABLE movie_data ( id INT identity, Movie VARCHAR (100), Title VARCHAR (100), Release_date VARCHAR (100), Wikipedia_URL VARCHAR (100), Genre VARCHAR (50), Director VARCHAR (50), Cast_1 VARCHAR (100), Cast_2 VARCHAR (100), Cast_3 VARCHAR (100), Cast_4 VARCHAR (100), Cat_5 VARCHAR (100), Budget MONEY, Revenue MONEY, Primary Key (id) )
Tom
P.S. Please don't ask new questions on an old thread. Create a new thread for your questions.
-
All queries are showing red underlines

GreenerJay
41
Reputation points
Hello
I am using SQL Server 2019 with SSMS 18.7. When I right click the servername or database and select "New Query", most query commands I type are underlined in Red. I am a SYSAdmin and am simply trying to enter the following commands:
ALTER DATABASE 'dbname'
SET RECOVERY SIMPLE
GO
Everything generates a syntax error. I feel like I am missing something very simple/obvious but I don't know what it is.
Thanks
Accepted answer