1. How can I get the list of all tables in Oracle / MySQL ?
Oracle:
(i) Login to account with respective username / password.
(ii) select * from user_tables;
MySQL:
(i) select * from information_schema.TABLES where TABLE_SCHEMA like <tableName>
2. How can I disable or enable constraints in Oracle / MySQL ?
- The constraints are disabled and enabled when there is huge amount of data to be copied from one table to another table.
- If the constraint is disabled, it still exists in the Database but it will not work till it is enabled.
- Copying data with constraints consume more time. hence first we disable the constraints ann copy the data , then enable back the constraints. This must be done only when the data is a valid data.
Oracle:
alter table <table_name> disable/enable constraint <constraint_name>
MySQL:
alter table <table_name> disable/enable constraint <constraint_name>
3. In Which Order the Clauses are executed in Oracle ?
- FROM
- WHERE
- GROUP BY
- HAVING
- SELECT
- ORDER BY
4. What are the Clauses available in Oracle ?
- Where
- Order By
- Distinct
- Group By
- Having
- Connect by Prior
- Start with
- On
- Using
- Returning
- Follows