Skip to content
Advertisement

Tag: boolean

Add new column with Boolean in PL/SQL

I’m learning PL/SQL right now and I have a doubt. I have created the following table called tbProducts: And I have inserted some values so the table is like this: Now what I’m looking for is a boolean variable that can be called bUpdate that returns FALSE if today’s date (26-AUG-2021) is greater than dLastDate and returns TRUE if it’s

Return 1 if number exists in table and 0 otherwise

I want to return 1 if some number already exists in table and 0 otherwise. I tried something but it doesn’t work: I want something similar to exists function that already exists in PostgreSQL, but instead of true and false I want 1 or 0. Answer EXISTS yields a boolean result. The simple way to achieve what you are asking

Advertisement