I have looked at some of the other questions similar to this one but have not had any luck. I am trying to delete the whole foreign key column from the blogs table. It is linked to a primary key in my students table as well.
Create table students
(
studentid integer primary key NOT NULL,
ulid varchar(20) NOT NULL,
password varchar(20) NOT NULL,
email varchar(50) NOT NULL
)
Create table blogs
(
blogid integer primary key NOT NULL,
blogdate date NOT NULL,
title varchar(50) NOT NULL,
description varchar(8000) NOT NULL,
category varchar (50) NOT NULL,
studentid integer NOT NULL,
foreign key (studentid) references students (studentid)
)
I tried this and it didn't work
alter table blogs drop column studentid
alter table blogs drop constraint studentid
alter table blogs drop foreign key studentid