DDL Commands
- CREATE
- ALTER
- DROP
Simple Ex:
CREATE TABLE EMP(Empno Int, EmpName VARCHAR(10)).
How to create a table using a Cobol Batch Program?
Every SQL command should start with EXEC SQL and End with END-EXEC.
CREATE:
EXEC SQL
CREATE TABLE EMP( EmpNo Int, EmpName VARCHAR(10)
END-EXEC
ALTER:
EXEC SQL
ALTER TABLE EMP
ADD EMP-PHONENO INT
END-EXEC
DROP :
EXEC SQL
DROP TABLE EMP
END-EXEC
CREATE TABLE EMP(Empno Int, EmpName VARCHAR(10)).
How to create a table using a Cobol Batch Program?
Every SQL command should start with EXEC SQL and End with END-EXEC.
CREATE:
EXEC SQL
CREATE TABLE EMP( EmpNo Int, EmpName VARCHAR(10)
END-EXEC
ALTER:
EXEC SQL
ALTER TABLE EMP
ADD EMP-PHONENO INT
END-EXEC
DROP :
EXEC SQL
DROP TABLE EMP
END-EXEC
ConversionConversion EmoticonEmoticon