Ho bisogno di ottenere le ultime due cifre di un numero intero. Ogni elemento inserito nelle tabelle viene considerato come un anno intero, ad esempio. YYYY
e voglio solo le ultime due cifre, in modo che tutti i campi mostranoSQL ottenendo le ultime due cifre dell'intero
YEAR
----
09
00
89
in cui il campo initialy era
YEAR
----
2009
2000
1989
EDIT: ho un reclamo dicendo
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
quando provo
select right(cast(year as char),2) from subjects;
quando ho provato ad utilizzare len() o la lunghezza() in PostgreSQL si dice che la funzione doesn' esiste – Madhusudan