RAVINDRA'S BLOG
Postgre SQL
Installing the Postgre SQL:
- Open the postgre sql site.
- Select version and type of the Windows.
- Run PostGresql as administrator.
- Click Next to start setup.
- Check all the components and click next.
- Select the folder to install the file.
- Setup a password to enter the credentials.
- Select preferred language.
- Give the path to save the data.
- Install all necessary programs.
- Click Finish, it opens the stack builder window.
- Select the Postgre SQL, whether local or server.
- Click Close.
Starting Postgre SQL:
- Open the PgAdmin4 from the start or search PgAdmin in search bar.
- After opening click on PostgreSQL10.
- Pop Up window appears enter the password.
SQL Queries:
- Create Table Creates the table.
- Displays, the result in the below data Output
- Insert into adds the values into the table.
- Select, gets the total data from the table
- Select where retrieves the data from the table with preferred options.
- In below image using or condition retrieved the data of the "productcode" and "deliverycity" where either logistic is "swetha" or "deliverycity" is "KNR".
- In below image using and condition retrieved the data of the "productcode" and "deliverycity" where logistic is "swetha" and "deliverycity" is "KNR".
- Alter Table add , creates the new column.
- Update column, adds the value to the column or changes the value in the column.
- In below, created the new column name called logistic.
- Added the values into column for each.