• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mysql error 1054: Unknown column 'home' in 'field list'

#1
[eluser]Unknown[/eluser]
I am using an Ubuntu server.

This is the error I get when I try to add data to the table, under the first record "TelType":


INSERT INTO `School`.`Instructor-Tel` (`TelType`, `TelNumber`) VALUES (home, 3058887452)
1054: Unknown column 'home' in 'field list'

THIS IS THE CODE:

-- -----------------------------------------------------
-- Table `School`.`Instructor-Tel`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `School`.`Instructor-Tel` (
`TelType` VARCHAR(50) NULL ,
`TelNumber` INT NULL ,
`Instructors_InstID` INT NOT NULL ,
PRIMARY KEY (`Instructors_InstID`) ,
CONSTRAINT `fk_InstTelph_Instructors1`
FOREIGN KEY (`Instructors_InstID` )
REFERENCES `School`.`Instructors` (`InstID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;



Any help is greatly appreciated!

#2
[eluser]TWP Marketing[/eluser]
Teltype is a varchar, so make the value a string: 'home'

#3
[eluser]Reneesh T K[/eluser]
INSERT INTO `School`.`Instructor-Tel` (`TelType`, `TelNumber`) VALUES ('home', 3058887452)

#4
[eluser]Unknown[/eluser]
Thanks a lot, I was able to figure it out based on your suggestions.

:-)


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.