Table of Contents


  1. Preface
  2. Introduction to Test Data Management
  3. Test Data Manager
  4. Projects
  5. Policies
  6. Data Discovery
  7. Data Subset
  8. Data Masking
  9. Data Masking Techniques and Parameters
  10. Data Generation
  11. Data Generation Techniques and Parameters
  12. Data Sets
  13. Plans and Workflows
  14. Monitor
  15. Reports
  16. ilmcmd
  17. tdwcmd
  18. tdwquery
  19. Data Type Reference
  20. Data Type Reference for Test Data Warehouse
  21. Data Type Reference for Hadoop
  22. Glossary

Select Clause

Select Clause

You can use the Select and Select Distinct clauses to run queries to analyze data in a table.
For example, the following query returns all data in table1:
SELECT * from table 1
The following query returns distinct data values from the columns col 1 and col 2 in table 2.
SELECT DISTINCT col 1, col 2 from table 2
You can use joins, aggregate functions, the Where clause with options, and other clauses with the Select and Select Distinct clauses.
You can run queries with table names and column names that contain spaces or dashes. You must enter the table name or column name within '\"'. Use the following syntax:
SELECT \"<column-name>\" from \"<table name>\"
  • You cannot use other special characters in a query.
  • You can use only English characters, the underscore ('_'), and numeric characters in a query.


You can use aliases when you run a query with the Select and Select Distinct clauses.
For example:
SELECT <alias_name>.<column_name> FROM <table_name> <alias_name>
SELECT <column_name> as <alias_name> from <table_name>
SELECT e.dept_id FROM Employee e
SELECT emp_name as name from TDWEMP
SELECT e.dept_id, FROM Employee e WHERE like 'J%'