Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The seem to be no need to add auto increment on 1st problem for songs table #14

Open
Mzamomelo opened this issue May 10, 2023 · 0 comments

Comments

@Mzamomelo
Copy link

/* 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant