SQL pgAdmin 4 Syntax

34 views Asked by At

Trying to run code and I keep getting "syntax error at or near "CREATE"".enter image description here

This code is from "Practical SQL" by Anthony DeBarros. After installing PostgreSQL and pgAdmin, I tried executing this code and it keeps popping up with this error. Not sure what is wrong. Thanks!

1

There are 1 answers

0
Daniel Hakobyan On

I think you missed some semicolon (;) after set autocommit = on

Change it to set autocommit = on; CREATE DATABASE analysis;

and I think it will work, inform me if this helped, please.