Learn sql by building a student database part 1

I logged in the database using - --username=freecodecamp --dbname=postgres
I type \l to access the database
then I typed CREATE DATABASE students
to create database and it goes no further. What do I need to do ?

I am guessing you forgot to add the semicolon at the end of your create statement.

There wasn’t one in the code but I will try it.

That semicolon didn’t work.

Please take a screenshot of what you are seeing.

It’s not connecting to the database any more. This is so another, one issue after another lol. I’m use to being able to solve on issue before another one pops up, here they all come at the same time lol.

You are trying to run an sql command from the bash command line.
Please use the psql command first to get into the psql command line then connect to the db and run your create statement.

I’m a bit confused because the instruction told me to run the --username=freecodecamp --dbname=postgres from there before and i typed /l and the database came up.

Now I can’t get that project to reopen. I’m going to be and starting over tomorrow :slight_smile:

you need to type in psql --username=freecodecamp --dbname=postgres or
–dbname=students if you already managed to get in and write some sql code. see screenshot for reference