Coating a pan in butter or spraying it with a non-stick spray is somewhat helpful, but adding cold batter to a preheated pan will really help crisp the edges of cornbread up right away so that it won't get stuck.