Professional Documents
Culture Documents
Sodapdf
Sodapdf
-------------------------------------
================================================================================
=====================================================================
columnname datatype(size),
foreign key(fkcolname) references parentable(pkcolname);
RENAME A COLUMN:
DELETE A COLUMN:
4.TRUNCATE: Truncate is used to remove all records of a table at one shot. Truncate makes a table emp
ty. Truncate will not remove
-----------
the table from database instead it removes records from table.
-->IF DROP is applied on table, the table will be removed from database and gets stored in recyclebin.
To restore the table from recyclebin to database,we use flashback.
-->To remove the table permanently from the database without storing in BIN ,
================================================================================
===================================================================
TCL(TRANSACTION CONTROL LANGAUGE): Since all the DML operations are not permanent, it can b
e saved permanently using TCL
---------------------------------
1)ROLLBACK: Rollback statement is used to undo/delete all the DML operations.
-----------
SYNTAX: rollback;
3)SAVEPOINT: Savepoint is a name given for a dml operation. it is used to fetch a particular dml operatio
n.
------------
SYNTAX: savepoint savepointname;
================================================================================
================================================================
1)GRANT: Grant is mainly used to provide permission for accessing the data from one database to anoth
er.
--------
SYNTAX: grant permissiontype on tablename to username;
2)REVOKE: Revoke is mainly used to take back the permission for accessing the data from one database
to another.
---------
SYNTAX: revoke permissiontype on tablename from username;