You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* For song Table, I dont think auto increment was necessary, because when values were inserted, code was not running
Below is what I think should be solution to the problem. */
CREATE TABLE songs (
id INT NOT NULL,
name VARCHAR(255) NOT NULL,
length FLOAT NOT NULL,
album_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (album_id) REFERENCES albums(id)
);
/*well for me, I'm on sql server hence I didn't add IDENTITY(1,1) on my code it it worked well, this identity is doing the same thing as auto increment on sql server */
If I'm wrong I'm open to correction.
The text was updated successfully, but these errors were encountered:
/* For song Table, I dont think auto increment was necessary, because when values were inserted, code was not running
Below is what I think should be solution to the problem. */
CREATE TABLE songs (
id INT NOT NULL,
name VARCHAR(255) NOT NULL,
length FLOAT NOT NULL,
album_id INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (album_id) REFERENCES albums(id)
);
/*well for me, I'm on sql server hence I didn't add IDENTITY(1,1) on my code it it worked well, this identity is doing the same thing as auto increment on sql server */
If I'm wrong I'm open to correction.
The text was updated successfully, but these errors were encountered: