0

How to create table using procedure in pl/sql?

21st Jun 2018, 5:01 PM
Rama Chandran
Rama Chandran - avatar
5 odpowiedzi
+ 1
SET SERVEROUTPUT ON SET ECHO OFF CREATE OR REPLACE PROCEDURE createS( inE# IN NUMBER(2), inName IN VARCHAR(2) )IS BEGIN --create STUDENT table CREATE TABLE STUDENT( E# NUMBER(12) NOT NULL, NAME VARHCAR2, CONSTRAINT STUDENT_PK PRIMARY KEY(E#)); COMMIT; END createS; /
21st Jun 2018, 7:03 PM
कामेश
कामेश - avatar
+ 1
what is the fuction of echo off?
23rd Jun 2018, 3:29 AM
Rama Chandran
Rama Chandran - avatar
+ 1
your above query was got compiled error. how you mentioned create table within another create? is it possible
23rd Jun 2018, 3:46 AM
Rama Chandran
Rama Chandran - avatar
+ 1
If echo is set to off, SQL statements that are run will not be displayed while setting echo to on will display them. BEGIN EXECUTE IMMEDIATE 'create table my_table (n number)'; END;
23rd Jun 2018, 6:01 AM
कामेश
कामेश - avatar
+ 1
tnx.... my another doubt is what is pivot and un pivot and what's the usage?
24th Jun 2018, 2:52 AM
Rama Chandran
Rama Chandran - avatar