ORACLE: Show Statistic Updates

The following Oracle SQL command allows you to see the statistics information, grouping by the last analyzed date (the is the name of schema you need to substitute into the SQL query: select to_char(last_analyzed,’MON-DD-YYYY’), count(*) from dba_tables where owner=” group by to_char(last_analyzed,’MON-DD-YYYY’) order by to_char(last_analyzed,’MON-DD-YYYY’); The output looks like this: TO_CHAR(LAST_ANALYZED,’MON-DD-YYYY’) —————————————————————————— COUNT(*) ———- FEB-01-2016 […]

SQLite: select certain # of records

A column name can be any of the names defined in the CREATE TABLE statement or one of the following special identifiers: “ROWID”, “OID”, or “_ROWID_”. These special identifiers all describe the unique integer key (the rowid) associated with every row of every table. The special identifiers only refer to the row key if the […]

Oracle SQL: Escape in LIKE clause

The underscore in oracle SQL, when it’s used in LIKE clause represent a one character wild card. For example: like ‘V_KAA’ (returns VaKAA, VbKAA) But you want to find something like V_KAAA (including a under score_), you would need to escape the _ character in like clause. For example: select * from table where ID […]