Query to see how many columns are in a sql db

Configurare noua (How To)

Situatie

Solutie

For PostgreSQL, MySQL, SQL Server, or SQLite, you can query the system catalogs or information schema:

SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = ‘your_table_name’;

Replace ‘your_table_name’ with the name of your table.

Tip solutie

Permanent

Voteaza

(7 din 9 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?