oracle – The first and last date of previous year
select TRUNC(SYSDATE – INTERVAL ‚1‘ YEAR,’YEAR‘) from dual;–01.01.18 select TRUNC(SYSDATE,’YEAR‘) – 1 from dual;–31.12.18
select TRUNC(SYSDATE – INTERVAL ‚1‘ YEAR,’YEAR‘) from dual;–01.01.18 select TRUNC(SYSDATE,’YEAR‘) – 1 from dual;–31.12.18
WHERE datum_narozeni BETWEEN (sysdate) – interval ’15‘ YEAR AND (sysdate + 30) – interval ’15‘ YEAR
select table_name from dba_tab_columns where column_name=’nazev_sloupce‘; select table_name from all_tab_columns where column_name=’nazev_sloupce‘;
select column_name, count(column_name) from table group by column_name having count (column_name) > 1;
GRANT privileges ON object TO user; privileges SELECT INSERT UPDATE DELETE REFERENCES ALTER INDEX ALL object database object that you are granting privileges for. In the case of granting privileges on a table, this would be the table name. user the name of the user that will be granted these privileges. Examples: GRANT SELECT,…
SELECT *FROM all_viewsWHERE owner = ‚owner_name‘ AND view_name = ‚view_name‘;
initcap(‚nejaky text‘) — Nejaky text