- Creating user
create user chinmay;
- Granting access with select
Grant select on employees to user1;- Providing roles to users
alter user chinmay with CREATEDB;- Deleting access from a user
revoke select on table_name from user_name;
- BEGIN
untill we commit it will not update in main Database
Begin;
update emp2 set first_name = 'jack' where employee_id = 2;- COMMIT
Now the commit will change this update in the database too.
Begin;
update emp2 set first_name = 'jack' where employee_id = 2;
commit;- ROLLBACK
when we use rollback then the non-commited transaction gets rollback.
Begin;
update emp2 set first_name = 'jack' where employee_id = 2;
Rollback;
- Savepoint
This helps to get back to the last savedpoint.
Create savepoint name;
checking