database - PL/SQL value of a boolean after execution using SQL%NOTFOUND -


just started learning pl/sql , cursor attributes. confused how sql%notfound works. in below code should v_1 compile true @ times?

declare    v_1     boolean;    v_2     number; begin    select  count(*)       v_2       t1;     v_1 := sql%notfound; end; 

in case v_1 should false. question being asked v_1 := sql%notfound "were there no records found query?", , answer "no" (or false) because query return row - therefore, v_1 false. it's kind of "double-negative" situation, kind of. :-)

share , enjoy.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -