Insert Query in postgre not working

Hello there , Greetings ! I' working on Postgresql and I want to insert the query into it but it is not inserting into it.
This is syntax of query
image

This is flow,


and this is pgadmin table

image

Look at the column "Title" vs "title".

I also tried that one but didn't get the anything

Did you deploy this change ?

Yes this is after photo

rename your column to title - lowercase unless you want to deal with:

All identifiers (including column names) that are not double-quoted are folded to lower case in PostgreSQL. Column names that were created with double-quotes and thereby retained upper-case letters (and/or other syntax violations) have to be double-quoted for the rest of their life: ( "first_Name" )

small tip: use SERIAL PRIMARY KEY for the id field, then you don't have to insert a number and it will be autogenerated.

after changing Title to title in pgadmin what should the value look like i got an error on it.

but if i give it as parameter it got successful on it.

because you used backticks and postgres will assume that is a column.

i cannot copy your code (screenshot) but you need to use double quotes for the query and in your query use single quotes for strings, ie.:

query: "insert into test (title) values ('test4')"

(assumes autokey generation for id)

1 Like

Thank you It is working now