First page Back Continue Last page Image

CREATE TABLE `knumbirds` (

-- Let us have the database provide a unique key

`kbID` INT(5) AUTO_INCREMENT,

-- Another non auto generated integer

`kbInteger` INT(10) NOT NULL,

-- Show a basic Decimal Option

`kbDec1` DECIMAL(9,2),

-- Show a Full House Decimal Option

`kbDec2` DECIMAL(9,2),

-- Show a signed Decimal Option

`kbDec3` DECIMAL(9,2),

-- Show a memory hog Decimal Option

`kbDec4` DECIMAL(18,9),

-- Show a DOUBLE Option

`kbDouble` DOUBLE,

-- Show a FLOAT Option

`kbFloat` FLOAT,

-- Indicate the primary key for this table

PRIMARY KEY(`kbID`)

);

-- Populate additional data into table

INSERT INTO `knumbirds` VALUES

(NULL,10,1.2,1234567.89,-1234567.89,1234567.89,1234567.89,1234567.89);

Fixed And Floating Point Examples