It has been revealed that two children were in the same back yard as a man who was shot in Sydney's inner-west overnight.

The man underwent surgery after being shot in a back street at Glebe.

The 25-year-old was at a party in Bellevue Street at about 8:00pm (AEDT) with a group of friends.

Police say three people pulled up in a blue Subaru WRX and called out the victim's name, before firing a number of shots, five of which hit the man in the upper legs and stomach.

The victim was then taken to hospital by his friends.

Detective Inspector Peter Bailey says that the most worrying aspect to the crime is that two teenagers related to the man who were standing nearby could have been hurt.

"The issue for us is that there were children in the yard at the time of the shooting, and the shooting was obviously outrageous in that some of these children could have been shot and killed ," he said.

Police are still looking for the three people who were in the car, and anyone who witnessed the attack or has information is being urged to contact Crime Stoppers on 1800 333 000.