PL/SQL Prompt

Discussion on SQL and MySQL
no avatar
jbxc
 
Posts: 2
Joined: Sat May 04, 2013 6:55 pm

PL/SQL Prompt

by jbxc » Sat May 04, 2013 7:00 pm

Dear all

I want to do a simple algorithm where the user enters a number and is returned the double of that number. I am beginner to PL/SQL and would like to know how to do. Thank you. I am trying the code below: which is not correct. Could you please help me? Thanks.

set serveroutput on;
set verify off;
num integer;
dobnum integer;
accept num prompt 'Digite um número: ';
BEGIN
dobNum:=num+num;
prompt dobNum;
END;

Carlos Junior
Database Administrator and Data Architect
-------------------------------------
Blog do DBA - Responsabilidade em TI
@carlosxbjunior (twitter)
carlosxbjunior@gmail.com
-------------------------------------

Return to SQL and MySQL