Find the number of columns in a table

前端 未结 19 2326
Happy的楠姐
Happy的楠姐 2020-11-27 11:13

It is possible to find the number of rows in a table:

select count(*) from tablename

Is it possible to find the number of columns in a tabl

19条回答
  •  忘掉有多难
    2020-11-27 11:48

    SELECT count(*)
    FROM information_schema.columns
    WHERE table_name = 'Your_table_name';
    

    Note: Your_table_name should be replaced by your actual table name

提交回复
热议问题