Depending on the company, they would usually BUY the CODE from you. (IE: Throw the word 'license' out the window, and start talking EXCLUSIVE RIGHTS)
You see, a company doesnt want to be selling the SAME program as someone else does, so in buying it off you, they would take away your right to...