Many people have purse hangers that go on the edge of the table.
Personally I don't.
If I'm against a wall I will hang it on the chair.
If I'm out in the open but in a location of the restaurant that is not frequented with people walking by I generally feel safe enough to hang it on the chair.
If the seat next to me is empty or I'm in a booth I set it next to me.
If I'm out in the open in a crowded restaurant then I either... use a crossbody purse and leave it on me, set it on my lap, or when need be I will set it on the floor between my feet. I know some think setting your purse on the floor is "disgusting" but I'm not terribly concerned with germs and dirt. I also don't have terribly expensive purses either lol.