SQL Example To Create Table On MySql DB

This is a very basic script that creates a table in the database. This has been tested to work with mysql, but similar format can be applied to other databases such as MS SQL Server, Oracle, IBM DB2 etc.

Here is the database schema that we want to create:

The code to create this table is:

CREATE TABLE KP_BANK_PYMT_INFO(
	INFO_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	BANK_NAME VARCHAR(100),
	CURRENT_BAL DECIMAL(5,2),
	PYMT_DUE_DT TIMESTAMP DEFAULT NOW()
	LAST_PYMT_AMT DECIMAL(5,2).
	LAST_PAID_DT TIMESTAMP,
	APR DECIMAL (3,2),
	REMARKS VARCHAR (100)
)