I'm trying to create a table but I keep getting errors:

Here are the errors:

mysql> source Tables3.sql;
Database changed
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 9

Here is the code:

use myDatabes;

CREATE TABLE Page3(
TeachingAndLearningCenter                               VARCHAR(30),
ConferenceWithInstructor                                VARCHAR(30),
ProblemSolvingSkills                                    VARCHAR(30),
ConferenceWithCounselor                                 VARCHAR(30),
ReadingSkills                                           VARCHAR(30),
WritingSkills                                           VARCHAR(30),
ComputationSkills                                       VARCHAR(30),
);

Check if the table already exists.

I already checked and it does not exist

The only other problem I see is the comma at the end of the last line which may or may not be a problem. Remove it and see if that fixes it. You might also shorten the names of each field -- long names may be very descriptive but can be a bitch to work with. Some databases may have a limit on the length of field names.

I have an error for one of my other tables. Here is the code:

use myDatabase;

CREATE TABLE Page2(
UnderstandingConcepts                                   VARCHAR(30),
FailureToTakeTests                                      VARCHAR(30),
ListeningProblems                                       VARCHAR(30),
FailureToTurnInAssignment                               VARCHAR(30),
InadequateStudyHabit                                    VARCHAR(30),
WritingSkills                                           VARCHAR(30),
PoorPerformanceOnAssignment                             VARCHAR(30),
ExcessiveAbsences                                       VARCHAR(30),
LowTestScores                                           VARCHAR(30),
Other:                                                  VARCHAR(30),
IncreaseStudyTime                                       VARCHAR(30),
WorkOnAssignments                                       VARCHAR(30),
HelpWithAssignment                                      VARCHAR(30),
HelpWithSubjectMatterComprehensionUnderstanding         VARCHAR(50)
);

HERE IS THE ERRORS:

mysql> source Tables2.sql;
Database changed
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':                                  VARCHAR(30),
IncreaseStudyTime                                                                               VARCHAR(30),
WorkOnAssignm' at line 11

line 13: remove the colon after other

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.