M
MJMP
I am starting to learn about SQL and had a question about the INSERT INTO
statment.
For the sake of discussion, there is table titled SONG. It has three
attributes: SongID (primary key, increment), SongName, and AlbumID. Note
that the last SongID in the table is 12.
And if we were interested in writing an INSERT INTO statement that adds a
song called "Wanna Rock" with album ID of 4 into the table, we used:
INSERT INTO SONG
VALUES (13, 'Wanna Rock', 4)
Will that automatically insert 13 into the SongID field if the field is set
to increment? And what if there used to be a SongID of 14 and then a DELETE
query was run, if you where to run an INSERT query, will Access use 14 or
will it assign the next number of 15?
I hope that made sense!
statment.
For the sake of discussion, there is table titled SONG. It has three
attributes: SongID (primary key, increment), SongName, and AlbumID. Note
that the last SongID in the table is 12.
And if we were interested in writing an INSERT INTO statement that adds a
song called "Wanna Rock" with album ID of 4 into the table, we used:
INSERT INTO SONG
VALUES (13, 'Wanna Rock', 4)
Will that automatically insert 13 into the SongID field if the field is set
to increment? And what if there used to be a SongID of 14 and then a DELETE
query was run, if you where to run an INSERT query, will Access use 14 or
will it assign the next number of 15?
I hope that made sense!