1

Executing SQL script in server ERROR: Error 1054: Unknown column 'Team 1' in 'field list' SQL Code:

 INSERT INTO `Project`.`Teams` (`TeamName`, `TeamID`) VALUES (Team 1, '1')

SQL script execution finished: statements: 21 succeeded, 1 failed

Fetching back view definitions in final form. Nothing to fetch

Any Idea what I am doing wrong?

ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
Dean
  • 11
  • 1

1 Answers1

2

You should use quote for a string

INSERT INTO `Project`.`Teams` (`TeamName`, `TeamID`) VALUES ('Team 1', '1')

Otherwise the db engine think is a column name

and eventually if the id is a number avoid quote for number

INSERT INTO `Project`.`Teams` (`TeamName`, `TeamID`) VALUES ('Team 1', 1)
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107