Skip to content

Fatih Acar's blog

About of Database Systems and Information Technologies

Menu
  • Home
  • About Me
  • Contact Me
Menu

Category: SQL

Learn Free Space of Tablespaces in Oracle

Posted on 31/07/201131/07/2011 by Fatih Acar

You can learn allocate area of tablespaces. You can use data dictionary for this processing. SELECT a.tablespace_name, a.file_name, a.bytes allocated_bytes, b.free_bytes FROM dba_data_files a, (SELECT file_id, SUM(bytes) free_bytes FROM dba_free_space b GROUP BY file_id) b WHERE a.file_id=b.file_id ORDER BY a.tablespace_name;

Recovery committed processing with Flashback in Oracle

Posted on 02/07/201102/07/2011 by Fatih Acar

Sometimes we want to recovery committed processing. You can use two methods for this task. Scenario : We have Countries table. This table has 5 rows. We deleted one row at this table. After we used commit. But we want to take to back. First Method select * from countries as of timestamp sysdate-5/1440; This…

Recovery dropped table with Flashback in Oracle

Posted on 01/07/201102/07/2011 by Fatih Acar

If you take to back dropped table, you use flashback statement. The recyclebin must be on to use flashback. Example You use this query to see recyclebin status show parameter recyc; recyclebin –> on After drop table employees; flashback table employees to before drop; Recyclebin Table If you delete a table , This table insert…

Data Dictionary in Oracle

Posted on 21/06/201121/06/2011 by Fatih Acar

The data dictionary is structured in tables and views, but it is also an important tool for all users, from end users to application designers and database administrators. You use SQL statements to access the data dictionary. Because the data dictionary is read-only, you can issue only queries against its tables and views. The data…

ALTER TABLE Statement in Oracle

Posted on 21/06/201103/07/2012 by Fatih Acar

If you want to change table, you can use alter table. You can add or drop constraint, add or drop column, modify column name or type, modify table name with alter table statement. Add, Drop and Modify Column ALTER TABLE employees ADD (birth_date varchar2(20)); ALTER TABLE employees MODIFY (birth_date date); ALTER TABLE employees MODIFY (birth_date…

Delete row from table which have constraint column

Posted on 15/06/201115/06/2011 by Fatih Acar

You can use two method for this processing. You can either do disable constraint or use on delete cascade or on delete set null in table. Method 1 Table Name : employees Constraints : primary_key_employee_id , foreign_key_department_id If you want to delete row from employees, you must disable foreign key constraint. ALTER TABLE employees DISABLE…

NVL, NVL2, COALESCE and NULLIF Function in Oracle

Posted on 15/06/201103/07/2013 by Fatih Acar

These functions work with any data type and pertain to the use of null values in the expression list. These functions use of null value and returns result value. NVL : Converts null value to an actual value. NVL2 : If first expression is not null, return second expression. If first expression is null, return…

LOWER,UPPER,INITCAP Function in Oracle

Posted on 15/06/201116/06/2011 by Fatih Acar

Lower, upper and initcap are case-conversion functions. If you want to change string, you can use this functions. Lower : Converts alpha character values to lowercase. Upper : Converts alpha character values to uppercase. Inıtcap : Converts alpha character values to uppercase for the first letter of each word, all other letters in lowercase. Example…

Nested Subquery in Oracle

Posted on 12/06/201115/06/2011 by Fatih Acar

Example select department_id, (select first_name from employees where employee_id=10) as “First Name”, (select last_name from employees where employee_id=20) as “Last Name”, (select department_name from departments where department_id = 20) as “Department” from employees where department_id = 20;

Date Functions in Oracle

Posted on 12/06/201115/06/2011 by Fatih Acar

Oracle default date format DD-MON-RR (14-MAY-11) for English Language Database. DD/MM/YYYY(14/05/2011) for Turkish. You can only subtraction between two dates. The result is day count. ROUND and TRUNC for Date ROUND with ‘MONTH’ => If the day is 16 or more than 16, the date rolls next month and the day makes 1. ROUND with…

Posts pagination

  • Previous
  • 1
  • 2
  • 3
  • 4
  • Next



View Fatih ACAR's profile on LinkedIn

Categories

  • Databases (329)
    • MsSQL Server (18)
      • Administration (16)
      • Errors and Solutions (4)
      • SQL (2)
    • MySQL (5)
      • Administration (4)
      • Backup And Recovery (1)
      • Errors and Solutions (1)
    • Oracle (290)
      • Administration (79)
      • Backup And Recovery (29)
      • Errors and Solutions (195)
      • Procedure (10)
      • SQL (32)
    • PostgreSQL (16)
      • Administration (15)
      • Errors and Solutions (3)
      • SQL (2)
    • Redis (1)
  • Microsotf Dynamics CRM (1)
  • Operating Systems (47)
    • Linux & Unix (34)
    • Windows (13)
  • Programing (5)
    • Python (5)
  • SAP (15)
    • Errors and Solutions (4)
    • SAP Basis (12)
  • Security (8)
    • Database Security (6)
    • Information Security (1)
    • System Security (4)
  • VMware (4)

Recent Posts

  • Redis 7 Sentinel Infrastructure Installation
  • Oracle Database 19c Multi Data Guard and DML Redirect, Switchover-Failover Operations on Oracle Linux 8
  • Oracle Database 23ai Free Installation Steps on Oracle Linux 9
  • Oracle Database 19c Active Data Guard Installation and DML Redirect, Switchover-Failover Operations on Oracle Linux 8
  • Oracle Database 19c Installation and 19.22 RU Patch Apply on Oracle Linux 8

Resources

  • Oracle
  • PostgreSQL

Blogroll

  • Gökhan Atıl
  • H. Koray Gündüz
  • Hakan Talip Öztürk
  • Zekeriya Beşiroğlu

Web Pages

  • BT Çözümleri

Tag Cloud

Administration Backup and Recovery Cluster Systems Database Administration Database Security Linux Linux Administration MsSQL Server MsSQL Server Error and Solutions MySQL MySQL Administration ORA-00018 ORA-00020 Oracle Oracle 12c Oracle 19c Oracle Administration Oracle Backup and Restore Oracle Data Guard Oracle Data Guard Failover Oracle Data Guard Switchover Oracle Error Solutions Oracle Linux Oracle Rman Backup Oracle Security Oracle SQL Query PostgreSQL PostgreSQL Administration PostgreSQL High Availability PostgreSQL Hot Standby Python SAP Basis Sap Errors and Solutions Sap System Administration SQL SQL Server Administration SQL Server Availability Group Stored Procedure System Administration System Security VMware VMware Administration Windows Windows Batch Script Windows Server

Social

  • View facar1987’s profile on Twitter
  • View facar’s profile on LinkedIn

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 17 other subscribers
©2026 Fatih Acar's blog | Built using WordPress and Responsive Blogily theme by Superb