Skip to content
Loading
  • Sreekanth Reddy
    0
    @
    Bhuvanesh Mohankumar
    providing the following Error :
    "An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference."
    0
  • Bhuvanesh Mohankumar
    0
    1. selecttable_name,Column_namefromInformation_Schema.ColumnshavingCount(Column_Name)>1
    Please try this.
    0
  • Sreekanth Reddy
    0
    @Bhuvanesh Mohankumar
    Executed as "select table_name,Column_name from Information_Schema.Columns having Count(Column_Name)>1 "
    Generated error as : "Column 'Information_Schema.Columns.TABLE_NAME' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause."
    Seems need to provide group by clause... can you please frame it correct.
    0
  • Bhuvanesh Mohankumar
    0
    1. SELECT table_name, Column_name FROM Information_Schema.Columns
    2. GROUPBY Column_name
    3. having Count(Column_Name) > 1
    0