0

Is there any way or query to count no. of column in a given table???

like we can count Row by the help of aggregate function COUNT so is there any other function which help to count column.

21st Mar 2018, 1:19 PM
Sadhak Raj
Sadhak Raj - avatar
3 ответов
+ 8
Is there any way or query to count no. of column in a given table? ✅ YES 🔍 Google keyword: mysql column count
21st Mar 2018, 2:51 PM
Zephyr Koo
Zephyr Koo - avatar
+ 7
This should work: ------------- SELECT count(*) FROM information_schema.columns WHERE table_schema = 'database_name' AND table_name = 'table_name'; ------------- Just replace database_name and table_name with the actual names for your database and table.
21st Mar 2018, 2:57 PM
David Carroll
David Carroll - avatar
+ 7
Um... well... your question is a bit vague. Generally speaking, get experience with Entity Framework. Datasets are part of EF. LINQ to SQL really isn't something used in development projects I've been involved in. It's good for quick prototyping. But so is EF.
21st Mar 2018, 6:20 PM
David Carroll
David Carroll - avatar