Where are post type columns stored in database?

How to actually get post type columns for a specific post type

All post types should be inside the wp_posts table inside your database, if you haven’t used the custom prefix.

This table has the following structure.

Column  Type    Comment
ID  bigint(20) unsigned Auto Increment   
post_author bigint(20) unsigned [0]  
post_date   datetime [0000-00-00 00:00:00]   
post_date_gmt   datetime [0000-00-00 00:00:00]   
post_content    longtext     
post_title  text     
post_excerpt    text     
post_status varchar(20) [publish]    
comment_status  varchar(20) [open]   
ping_status varchar(20) [open]   
post_password   varchar(255) []  
post_name   varchar(200) []  
to_ping text     
pinged  text     
post_modified   datetime [0000-00-00 00:00:00]   
post_modified_gmt   datetime [0000-00-00 00:00:00]   
post_content_filtered   longtext     
post_parent bigint(20) unsigned [0]  
guid    varchar(255) []  
menu_order  int(11) [0]  
post_type   varchar(20) [post]   
post_mime_type  varchar(100) []  
comment_count   bigint(20) [0]   

If you need more info about the posts types you have on your system refer to the global variable $wp_post_types.

This variable is an array holding WP_Post_Type Objects, where the first one is like this:

[post] => WP_Post_Type Object
    (
        [name] => post
        [label] => Posts
        [labels] => stdClass Object
            (
                [name] => Posts
                [singular_name] => Post
                [add_new] => Add New
                [add_new_item] => Add New Post
                [edit_item] => Edit Post
                [new_item] => New Post
                [view_item] => View Post
                [view_items] => View Posts
                [search_items] => Search Posts
                [not_found] => No posts found.
                [not_found_in_trash] => No posts found in Trash.
                [parent_item_colon] => 
                [all_items] => All Posts
                [archives] => Post Archives
                [attributes] => Post Attributes
                [insert_into_item] => Insert into post
                [uploaded_to_this_item] => Uploaded to this post
                [featured_image] => Featured Image
                [set_featured_image] => Set featured image
                [remove_featured_image] => Remove featured image
                [use_featured_image] => Use as featured image
                [filter_items_list] => Filter posts list
                [items_list_navigation] => Posts list navigation
                [items_list] => Posts list
                [menu_name] => Posts
                [name_admin_bar] => Post
            )

        Where are post type columns stored in database? => 
        [public] => 1
        [hierarchical] => 
        [exclude_from_search] => 
        [publicly_queryable] => 1
        [show_ui] => 1
        [show_in_menu] => 1
        [show_in_nav_menus] => 1
        [show_in_admin_bar] => 1
        [menu_position] => 5
        [menu_icon] => 
        [capability_type] => post
        [map_meta_cap] => 1
        [register_meta_box_cb] => 
        [taxonomies] => Array
            (
            )

        [has_archive] => 
        [query_var] => 
        [can_export] => 1
        [delete_with_user] => 1
        [_builtin] => 1
        [_edit_link] => post.php?post=%d
        [cap] => stdClass Object
            (
                [edit_post] => edit_post
                [read_post] => read_post
                [delete_post] => delete_post
                [edit_posts] => edit_posts
                [edit_others_posts] => edit_others_posts
                [publish_posts] => publish_posts
                [read_private_posts] => read_private_posts
                [read] => read
                [delete_posts] => delete_posts
                [delete_private_posts] => delete_private_posts
                [delete_published_posts] => delete_published_posts
                [delete_others_posts] => delete_others_posts
                [edit_private_posts] => edit_private_posts
                [edit_published_posts] => edit_published_posts
                [create_posts] => edit_posts
            )

        [rewrite] => 
        [show_in_rest] => 1
        [rest_base] => posts
        [rest_controller_class] => WP_REST_Posts_Controller
    )

Hope this helps.