Ok, let’s say that you need to turn some rows into columns. For example, you have a table where you have information of a person span over several records.
Record 1 contains the type of the person like this: person_id, attribute_id and value.
example : 123,...
Well, this is a fine statement to delete duplicates in a table :
A.ID = B.ID and
any additional condition
and other conditions on...
Here goes a simple SQL to retrieve the amount of space that a partioned takes (partion by partition) in MB.
select partition_name, bytes/1024/1024 as size_mb
where segment_name = 'YOUR_TABLE'
order by 1
There you all your partions in MB.
How to retrieve a random sample of a percentage of a table’s rows ? Here goes the shorty for Oracle. Maybe there is another solution. But that one worked for me.
select * from
(select * from table order by dbms_random.value)
where rownum <= (select...
Here goes a tiny snippet that should get you started by using Oracle as your database instead of the classic MySql RDBMS.
// At first, get connected to the instance of your RDBMS
$conn = oci_connect("user", "password",...
Oracle Partitioning enhances the manageability, performance, and availability of database applications. Partitioning allows tables, indexes, and index-organized tables to be subdivided into smaller pieces, enabling these database objects to be managed and accessed at a finer level of...