Your PL / SQL is valid and available:
- The TABLE table contains exactly 4 columns corresponding to the 4 values ββyou have selected.
- The query will return exactly 1 row.
If the TABLE table does not contain exactly 4 columns, you need to select something else, maybe only 4 variables:
DECLARE v_col1 table.col1%type; v_col3 table.col3%type; v_col4 table.col4%type; v_column table2.column%type; BEGIN SELECT table.col1, table.col3, table.col4, table2.column INTO v_col1, v_col3, v_col4, v_column FROM table JOIN table2 On table.col6 = table2.col1; END;
If your query returns more than 1 row, you will get TOO_MANY_ROWS exception; and if it does not return rows, you will get a NO_DATA_FOUND exception.
source share