I have 100 columns in a table and I want to list 99 columns except a particular one.
How to exclude that columns name?
COLUMNS table holds all information about the columns in your MySQL tables. To exclude columns, you use the REPLACE() and GROUP_CONCAT() functions to generate the column names you wish to include in your SELECT statement later.
The easiest way to select specific columns in the Hive query is by specifying the column name in the select statement. SELECT col1, col3, col4 .... FROM Table1; But imagine your table contains many columns (i.e : more than 100 columns) and you need to only exclude a few columns in the select statement.
Hide columns Select one or more columns, and then press Ctrl to select additional columns that aren't adjacent. Right-click the selected columns, and then select Hide.
To avoid grouping by a specific column that returns multiple values, you can either remove it from the query, or you can explicitly tell it which value you want. You can do this using aggregate or analytic functions, like: MAX(ExtensionID) MIN(ExtensionID)
The Tutorial D relational database query language does allow a projection to be expressed in terms of the attributes to be removed using ALL BUT
however there is no such equivalent syntax in SQL that allows you to do this. You need to explicitly list the specific ones that you want.
You could use a View if you commonly need this same set of columns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With