But I need to fetch the value of "@franchiseId" variable from franchise Table and then display this variable's value along with other columns from the Mytable table.Moreover I have to use this value with joins once the value is fetched correctly.
should I Do it dis way:
SELECT FranciseId=(select FranchiseName FROM franchise WHERE username=@username)
I think this will insert the frachiseId column value into the Mytable and from their i can fetch the records..
Is it correct????