Insert value dosent add all the rows

Goose 20 Reputation points
2023-12-18T14:07:40.46+00:00

I have an headache of a problem, im in school learning SQL and have a easy assignment to create a bowling database, nothing that really matters because i have had the problem with previous assignments. When running the INSER INTO part it just affects the first row, the last 0 is added to try and solve the issue so it dosent have anything to do with it and it is the exact same thing when trying to add multiply rows in another script, how ever. the exact same script works om my stationary computure at home, this problem only occur on my computure. The script works fine on my friends laptop aswell and we have the exact same orderd on the same day and my teacher have no ide.

Im working in SSMS and have tried removing and reinstalling both the sql server on my computor and SSMS, i have also reset all settings in SSMS

User's image

SQL Server | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Erland Sommarskog 129.4K Reputation points MVP Volunteer Moderator
    2023-12-18T22:26:40.31+00:00

    It sounds as if you have issued the command SET ROWCOUNT 1 at some point. Run SET ROWCOUNT 0 to get out of this.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Olaf Helper 47,586 Reputation points
    2023-12-19T07:21:06.7933333+00:00

    I wonder your SQL statement works at all, it should raise an error, because you didn't list the 2 column name you want to insert to and the first column "timeId" is an identity.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.