Aquí hay una tabla de alumnos codifiqué en PostgreSQL (un extracto):mensaje de error al utilizar INSERT INTO
CREATE TABLE "Student"
(
ucas_no integer NOT NULL,
student_name character(30) NOT NULL,
current_qualification character(30),
degree_of_interest character(30),
date_of_birth date NOT NULL,
street_address character(30) NOT NULL,
city character(30) NOT NULL,
post_code character(10) NOT NULL,
country character(20) NOT NULL,
phone_no character(15) NOT NULL,
gender character(6) NOT NULL,
user_name character(15) NOT NULL,
"password" character(30) NOT NULL,
CONSTRAINT pk_ucas_no PRIMARY KEY (ucas_no),
CONSTRAINT ten_digits_only CHECK (length(ucas_no::character(1)) >= 10 OR length(ucas_no::character(1)) <= 10)
)
Ahora estoy usando la función de herramienta de consulta de pgAdmin para insertar datos en la tabla. Aquí está el código de INSERT INTO ...
INSERT INTO Student
VALUES
('912463857', 'Jon Smith', 'A-Level', 'BSc(Hons) Computer Science', '10/06/1990', '50 Denchworth Road', 'LONDON', 'OBN 244', 'England', '02077334444', 'Male', 'jonsmi', '123456');
El problema que estoy teniendo es que estoy recibiendo un mensaje de error que indica la Tabla de alumnos no existe, cuando es claramente en mi DATABSE. Aquí está el mensaje de error:
ERROR: relation "student" does not exist
LINE 1: INSERT INTO Student (ucas_no, student_name, current_qualific...
^
********** Error **********
ERROR: relation "student" does not exist
SQL state: 42P01
Character: 13
¿Alguien tiene una idea de lo que está mal?
También en el código INSERT INTO, ¿importa si envuelvo los datos con una sola comilla o no? Veo que algunos códigos tienen comillas simples y otros no. –