I have a few columns in multiple tables in a project that I’ve inherited where the column names are like "Owner ID", "Contractor ID", "Phone Number" and many more like them. Is there a way to just go through tables like this and change the names so they’re like "owner_id", "contractor_id" and so on? I’ve been doing this manually with few alter statements but it’s takes a lot of time…
2
Answers
By using @Bill Karwin's answer, if you just want to test it in a specific table first, something like this will work: