I am just getting started with SQL, and while I work I am making a lot of typos. For instance, after running psql mydatabase, I tried to make a table -
postgres=# CREATE TABLE table_name (
postgres=(# _id serial PRIMARY KEY
postgres=(# name VARCHAR (50) UNIQUE NOT NULL,
postgres=(#
and at that point, I realize that I forgot a comma after PRIMARY KEY. How do I just cancel everything that I am typing and start the command from scratch? I couldn't find any answers via Google or StackOverflow, despite this surely being a common problem.. Do I just type ABORT; or is that something completely different? Working from Windows PowerShell, if that makes any difference.
EDIT: I checked the commands and apparently you can type \r and press enter to reset the query buffer. Keeping this posted for other newbies