connect to database for postgresql 1

connect to database for postgresql

for connect to database write: \c databaseName

Here is what the above code is Doing:
1. We’re creating a new database called “testdb”
2. We’re creating a new table called “cars”
3. We’re adding a column called “id” which is an integer and is the primary key
4. We’re adding a column called “name” which is a string
5. We’re adding a column called “price” which is a float

Similar Posts