Not necessarily. You could do this:
Declare @CityId int, @CategoryId int
Set @CityId = (select city_id from city_master where city_name= 'abc')
Set @CategoryId = (select city_id from city_master where city_name='123')
Insert into wines_available(name, address, city_id, category_id) values (@name, @address, @cityid, @categoryid)
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
I'm glad you got it working
Please mark this thread as solved if you have found an answer to your question and good luck!
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735