When I use this statement it does not return results.
Result<Record> result = (Result<Record>) jooq
.select()
.from("Employees")
.where(DSL.cast("FirstName", MySQLDataType.BINARY)
.eq(DSL.cast(firstName, MySQLDataType.BINARY)))
.fetchOne();
I want to select only one Result.
Structure:
--
-- Table structure for table `Employees`
--
CREATE TABLE IF NOT EXISTS `Employees` (
`id` int(11) NOT NULL,
`FirstName` varchar(100) NOT NULL,
`LastName` varchar(150) NOT NULL,
`Age` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
I want to select is Jack and it exists but it returns null.
Example:
SELECT * FROM Employees WHERE FirstName = Jack;