1

here's the code:

http://sqlfiddle.com/#!4/ee7da/4247


CREATE TABLE supportContacts 
(
 id int primary key, 
 type varchar2(20), 
 details varchar2(40)
)
/

INSERT INTO supportContacts
(id, type, details)
VALUES
(1, 'Email', 'admin@sqlfiddle.com')

/

INSERT INTO supportContacts
(id, type, details)
VALUES
(2, 'Twitter', '@sqlfiddle')


DECLARE
 x supportContacts.type%type;
 y supportContacs.details%type;
BEGIN 
  select type,details into x,y from supportContacts where id = 1;
  dbms_output.put_line(x);
  dbms_output.put_line(y);
END; 
/

i wonder why this doesn't work?

Kokizzu
  • 24,974
  • 37
  • 137
  • 233

2 Answers2

3

This: y supportContacs.details%type;

Should be: y supportContacts.details%type;

If I make that change, it works for me.

DCookie
  • 42,630
  • 11
  • 83
  • 92
1

You need change query terminator symbol with bottom right button (like combobox); See proof SQLFiddle

knagaev
  • 2,897
  • 16
  • 20