Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6651039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:57:48+00:00 2026-05-26T00:57:48+00:00

using mySQL version 5.0.51a-24+lenny4. What is wrong with the following script? I keep getting

  • 0

using mySQL version 5.0.51a-24+lenny4. What is wrong with the following script? I keep getting the following error:

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 'mjla_creat.sql' at line 1

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';


-- -----------------------------------------------------
-- Table `mjla_db`.`ClassTable`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mjla_db`.`ClassTable` (
  `classId` VARCHAR(20) NOT NULL COMMENT 'This columns is used to store the class identifier.' ,
  `className` VARCHAR(10) NOT NULL COMMENT 'Holds the name of the class. for example.' ,
  `classSection` VARCHAR(5) NOT NULL COMMENT 'Holds the section label. Used to designate which section the class is.' ,
  `classSemester` VARCHAR(2) NOT NULL COMMENT 'This is used to designate which semester. This is given two character positions incase a school needed to determine which semester within the semester.' ,
  `classYear` VARCHAR(4) NOT NULL COMMENT 'This is for the year of the class.' ,
  `teacherId` VARCHAR(20) NOT NULL ,
  PRIMARY KEY (`classId`) ,
  UNIQUE INDEX `classId_UNIQUE` (`classId` ASC) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `mjla_db`.`TeacherTable`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mjla_db`.`TeacherTable` (
  `teacherId` VARCHAR(20) NOT NULL COMMENT 'This is the teacher id. This table will have to be pre-populated by the administrator with teacher id\'s and their passwords.' ,
  `teacherPassword` VARCHAR(32) NOT NULL COMMENT 'Stores the password as md5.' ,
  PRIMARY KEY (`teacherId`) ,
  UNIQUE INDEX `teacherId_UNIQUE` (`teacherId` ASC) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `mjla_db`.`QuizTable`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mjla_db`.`QuizTable` (
  `classId` VARCHAR(20) NOT NULL COMMENT 'FK related to the ClassTable. This way each Class in the ClassTable is associated with its quiz in the QuizTable.' ,
  `quizId` INT NOT NULL AUTO_INCREMENT COMMENT 'This is the quiz number associated with the quiz.' ,
  `quizObject` BLOB NOT NULL COMMENT 'This is the actual quiz object.' ,
  `quizEnabled` TINYINT(1)  NOT NULL ,
  PRIMARY KEY (`classId`) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `mjla_db`.`StudentTable`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mjla_db`.`StudentTable` (
  `studentId` VARCHAR(20) NOT NULL ,
  `lastName` VARCHAR(45) NOT NULL ,
  `firstName` VARCHAR(45) NOT NULL ,
  `studentPassword` VARCHAR(32) NOT NULL ,
  PRIMARY KEY (`studentId`) )
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `mjla_db`.`StudentRecordTable`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mjla_db`.`StudentRecordTable` (
  `classId` VARCHAR(20) NOT NULL ,
  `studentId` VARCHAR(20) NOT NULL ,
  `quizGrade` TINYINT NULL ,
  `quizId` INT NOT NULL AUTO_INCREMENT ,
  PRIMARY KEY (`classId`) )
ENGINE = InnoDB;



SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:57:48+00:00Added an answer on May 26, 2026 at 12:57 am

    near ‘mjla_creat.sql’ at line 1

    This string does not occur in the SQL script you show, so the error is not in your SQL script. It’s probably an error from the command you’re using to invoke the script.

    You can invoke from a shell prompt (you may also need other options to connect to the database):

    $ mysql mjla < mjla_creat.sql 
    

    Or you can invoke it from the MySQL monitor:

    mysql> \. mjla_creat.sql
    

    Or

    mysql> source mjla_creat.sql
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the following error: Database connection failed: mysqlnd cannot connect to MySQL
We are currently using Mysql version 5.0 in our application and are thinking of
We are using MySQL version 5.0 and most of the tables are InnoDB. We
We are using MySql 5.0 on Ubuntu 9.04. The full version is: 5.0.75-0ubuntu10 I
I normally code on windows and using MYSQL4.1. And mysql gem version is 2.8.1.
I'm writing a program using C++ and the MySQL C API (version 5.1.31 ubuntu2).
Using MySQL syntax, how would I write a query to return the following (I
(Using MySQL and PHP) I have a search form that will allow my users
Using MySQL, I have three tables: projects : ID name 1 birthday party 2
I am using MySQL DB. I have a cars table, by describing this table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.