Play Amo offers Australian players an exciting online casino experience. Enjoy a wide selection of pokies, live dealer games, and table options. Both new and returning players can benefit from generous bonuses and ongoing promotions to enhance their gaming fun.

Yabby Online Casino delivers a premium online casino experience for Australians. Players can enjoy engaging pokies, live tables, and classic table games. Attractive promotions and bonuses reward both newcomers and loyal players for an enhanced gaming adventure.

Ripper Casino AU provides a secure and entertaining platform for Australian players. Featuring popular pokies, live dealer games, and table options, Ripper Casino ensures fun and excitement. Exciting bonuses and promotions are available for all types of players.

Redstagcasino brings Australians a top-quality online casino environment. With engaging pokies, live dealer games, and table options, players can enjoy thrilling gameplay. Generous bonuses and promotions are offered to enhance the overall casino experience.

Usage of UPDATE statement in POSTGRESQL Database

The UPDATE statement is used to modify/update data in a database table.

SYNTAX:

UPDATE statement is used to modify one column or multiple columns at a time.

The syntax for updating one column is :

UPDATE “table_name” SET “column_1” = [new value] WHERE “condition”;

The syntax for updating multiple columns is:

UPDATE “table_name” SET “column_1 = [new value], column_2 = [new value],…. column_N = [new value] WHERE “condition”;

Examples:

We are using following table for our examples:

Table Employee

Example1 : Updating a single column in a database table called Employee

In this example we need to change the salary of Dave is actually 70000 instead of 80000 and that particular entry needs to be updated. To do so, we use the following SQL query:

UPDATE Employee SET salary = 70000 WHERE name = ‘Dave’ AND dept = ‘Accounting’;

The Resulting table would look like:

In this case only one row is modified because of WHERE clause. If you need to modify all rows then remove the WHERE clause and use the condition.

Example2 : Updating multiple columns in a database table called employee

We notice that salary of Clark is 80000 and dept is Managing. To do so we use the following SQL query:

UPDATE Employee SET salary = 80000, dept = ‘Managing’ WHERE name = ‘Clark’ ;

The Resulting table looks like :

Example3: Consider one more table and change multiple columns

UPDATE EMPLOYEE_DEMO1 SET first_name=‘Harshitha’ where ID=2

The output looks like:

Note : If you don’t supply where condition in update statement , all the rows in the table updated.

Leave a Comment

Your email address will not be published. Required fields are marked *