Sample table (say Employee) structure
Column Name | Datatype |
---|---|
ID | INT |
F_Name | STRING |
L_Name | STRING |
Phone | STRING |
Address | STRING |
Project all the columns
Use wild card *
to project all the columns. e.g.
Select * from Employee
Project selected columns (say ID, Name)
Use name of columns in the projection list. e.g.
Select ID, Name from Employee
Discard 1 column from Projection list
Display all columns except 1 column. e.g.
Select `(ID)?+.+` from Employee
Discard columns matching pattern
Reject all columns which matches the pattern. e.g. Reject all the columns ending with NAME
Select `(.*NAME$)?+.+` from Employee