In the SQL, what controls the turning on/off of product meta title and product name?

Here is a screen shot:
http://904roofing.com/metascreen.jpg

Can somebody show me how I could write a little script I could send thru the sql patch that would flip the switch to ON for all prod meta titles?

Then another script to for flipping on all the product names?

Thanks,
Mike