BASICS OF SQL SERVER

Thursday, 19 June 2014

How to find the Table which has Maximum Columns in a database


SELECT NAME AS Table_Name, max_column_id_used AS Total_Columns
From SYS.tables
WHERE max_column_id_used =
(SELECT MAX(max_column_id_used) FROM SYS.tables)
Posted by Unknown at 07:20
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

ABOUT ME

ABOUT ME

Blog Archive

  • ▼  2014 (48)
    • ►  November (4)
    • ►  October (4)
    • ►  September (2)
    • ▼  June (28)
      • SQL Server Database Mail Setup
      • SQL Server DBA Responsibilities
      • How to find the Table which has Maximum Columns in...
      • SQL SERVER DEV Q & A
      • SQL SERVER DBA Q AND A
      • LOG SHIPPING ERRORS AND TROUBLESHOOTING
      • REPLICATION CONFIGURATION
      • REPLICATION AGENTS
      • Db_mail
      • VERIFYING THESE SITES
      • FIND FAILED JOBS IN 24 HOURS
      • replace space as 00
      • SQL Database Mail - Send Emails from SQL Server
      • MAIL
      • CLONING A DATABASE
      • XP_CMDSHELL
      • PREDEFINE STORED PROCEDURES AND COMMANDS
      • PRINT NUMBERS LIKE TRIANGLE
      • SEARCH A WORD IN DATABASE TABLES
      • CONFIGURE SQL SERVER DATABASE MIRRORING USING SSMS
      • CONFIGURE SQL SERVER DATABASE LOG SHIPPING USING SSMS
      • LOG SHIPPING VS. MIRRORING VS. REPLICATION
      • SQL SERVER DBA QUESTIONS ONLY
      • SSRS INTERVIEW QUESTIONS AND ANSWERS
      • SQLSERVER INTERVIEW QUESTIONS AND ANSWERS
      • SSIS INTERVIEW QUESTIONS AND ANSWERS
      • READING XML DATA , MERGE WITH ORIGINAL DATA AND TY...
      • DEFRAGMENT
    • ►  May (10)
Picture Window theme. Theme images by merrymoonmary. Powered by Blogger.