Yurttas/PL/DBL/oracle/F/02/Movie/StarsIn-def.sql
Revision as of 23:27, 4 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div"> →REM REM REM StarsIn-def.sql REM REM: DECLARE cursor_handle INTEGER; BEGIN cursor_handle := DBMS_SQL.OPEN...")
1/*
2REM
3REM
4REM StarsIn-def.sql
5REM
6REM
7*/
8
9DECLARE
10
11 cursor_handle INTEGER;
12
13BEGIN
14
15 cursor_handle := DBMS_SQL.OPEN_CURSOR;
16
17 DBMS_SQL.PARSE(cursor_handle,
18 'CREATE TABLE StarsIn(title VARCHAR2(24) NOT NULL,
19 year NUMBER(4) NOT NULL,
20 name VARCHAR2(24) NOT NULL,
21 PRIMARY KEY(title,year,name),
22 FOREIGN KEY(title,year) REFERENCES Movie(title,year),
23 FOREIGN KEY(name) REFERENCES MovieStar(name))',
24 DBMS_SQL.V7);
25
26 DBMS_SQL.CLOSE_CURSOR(cursor_handle);
27END;
28/