Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4849

SQL Script that runs successfully shows an error count

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 12.0
    • Fix Version/s: Next
    • Component/s: db - MySQL
    • Labels:
      None
    • Environment:
      NetBeans 12, Java 14 (AdoptOpenJDK), MySQL 8, Connector/J 8.0.21

      Description

      A script that creates 3 tables, one of which is a bridge table, runs successfully in a MySQL DB connection in NetBeans. However, it ends with the following:
      Execution finished after 0.399 s, 86 errors occurred.
      There are no errors.
      Here is the script:

      USE AQUARIUM;

      SET FOREIGN_KEY_CHECKS = 0;
      DROP TABLE IF EXISTS StudentBrCourse;
      DROP TABLE IF EXISTS Students;
      DROP TABLE IF EXISTS Courses;
      SET FOREIGN_KEY_CHECKS = 1;

      CREATE TABLE Students(
      StudentID INT,
      UserName VARCHAR(255),
      FirstName VARCHAR(255),
      Email VARCHAR(255),
      PhoneNumber INT,
      BeginningDate TIME,
      EndingDate TIME,
      MaxHours INT,
      PRIMARY KEY(StudentID)
      );

      CREATE TABLE Courses(
      CourseID INT,
      CourseAbbreviation VARCHAR(255),
      CourseNumber INT,
      SectionNumber INT,
      ProfessorID INT,
      PRIMARY KEY (CourseID)
      );

      CREATE TABLE StudentBrCourse(
      MyKey int,
      StudentID int,
      CourseID int,
      CONSTRAINT fkstudentid FOREIGN KEY (StudentID) REFERENCES Students(StudentID),
      CONSTRAINT fkcourseid FOREIGN KEY (CourseID) REFERENCES Courses(CourseID),
      PRIMARY KEY (MyKey)
      );

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              omniprof Kenneth Fogel
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: