The following statement drops the unique key on the email column of the employees table:
ALTER TABLE employees DROP UNIQUE (email);
The DROP clause in this statement omits the CASCADE clause. Because of this omission, Oracle Database does not drop the unique key if any foreign key references it.
Description of the illustration drop_constraint_clause
Guest Additions in Oracle Virtual Box 4.3.6 version somehow conflicts with Ubuntu 14.04 LTS.
Warning: unknown version of the X Window System installed. Not
installing X Window System drivers.
Do not dig in for help on the internet. Just use Oracle Virtual Box 4.3.28.It worked for me.
The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.
Here’s an excerpt:
A San Francisco cable car holds 60 people. This blog was viewed about 410 times in 2014. If it were a cable car, it would take about 7 trips to carry that many people.
Click here to see the complete report.
Use the DROP TABLE statement to move a table or object table to the recycle bin or to remove the table and all its data from the database entirely.
Dropping a table invalidates dependent objects and removes object privileges on the table. Thus if you just want to claim the space, have a look at ” TRUNCATE TABLE”.
DROP TABLE [ schema. ] table [ CASCADE CONSTRAINTS ] [ PURGE ] ;
Specify PURGE if you want to drop the table and release the space associated with it in a single step. If you specify PURGE, then the database does not place the table and its dependent objects into the recycle bin.
Using this clause is equivalent to first dropping the table and then purging it from the recycle bin.
Shit !!! I dropped “Users” table. What can ı do now ? Hint: “FLASHBACK TABLE”; but that’s for another post.
Specify CASCADE CONSTRAINTS to drop all referential integrity constraints (foreign keys) that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, then the database returns an error and does not drop the table.
WHERE OWNER = :owner
ORDER BY OWNER,
Difference between those views is;
- USER_OBJECTS shows the current user objects.
- ALL_OBJECTS shows all objects of current and those object which you have rights to access.
- DBA_OBJECTS shows all object of all users .
Lets generalize this valuable information. It is applicable to every user_<blabla>, all_<blabla>, dba_<blabla> views.
I got this information here. But a wise man one said.
“Repeat the real truth wherever it is needed, altough its not revealed by you”
Dont ask me who was this guy. Never saw him.
SELECT VLO.OS_USER_NAME “OS USERNAME”,
VLO.ORACLE_USERNAME “DB USER”,
AO.OBJECT_NAME “OBJECT LOCKED”,
DECODE (VLO.LOCKED_MODE, 1, ‘NO LOCK’,
2, ‘ROW SHARE’,
3, ‘ROW EXCLUSIVE’,
5, ‘SHARE ROW EXCL’,
NULL) “MODE OF LOCK”,
VS.STATUS “CURRENT STATUS”
FROM V$LOCKED_OBJECT VLO,
WHERE VLO.OBJECT_ID = AO.OBJECT_ID
AND VS.STATUS <> ‘KILLED’
AND VLO.SESSION_ID = VS.SID
AND VS.PADDR = VP.ADDR;