A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Don't use quotes, use brackets, that is
ALTER DATABASE [dbname]
Tom
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Answer accepted by question author
Don't use quotes, use brackets, that is
ALTER DATABASE [dbname]
Tom
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 like
CREATE 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.
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)
)