Test Data Management
- Test Data Management 10.5
- All Products
SELECT * from Employee where NAME ='Mary' OR (NAME='Jessica' AND DEPT_ID=1)
For example:SELECT * FROM <table_name> WHERE <column_name> = <column_value>
SELECT * FROM customers WHERE state = 'California'
For example:SELECT * FROM <table_name> WHERE <column_name> = <column_value> AND <column_value> <operator> <column_value>
SELECT * FROM customers WHERE state = 'California' AND company_name = 'Informatica'
For example:SELECT * FROM <table_name> WHERE <column_name> = <column_value> OR <column_name> <operator> <column_value>
SELECT * FROM customers WHERE state = 'California' OR company_name = 'Informatica'
For example:SELECT * FROM <table_name> WHERE <column_name> = <column_value> OR <column_name> <operator> <column_value> AND <column_name> <operator> <column_value>
SELECT * FROM customers WHERE state = 'California' OR available_credit > 500 and revenue < 90
For example:SELECT columns FROM <table 1> LEFT OUTER JOIN <table 2> ON <table 1>.<col 1> = <table 2>.<col 1> WHERE <table 1>.<col 1> <operator> <column_value>
SELECT suppliers.supplier_id, suppliers.supplier_name, orders.order_date FROM suppliers LEFT OUTER JOIN orders ON suppliers.supplier_id = orders.supplier_id WHERE supplier.supplier_id > 10
For example:SELECT DISTINCT <col 1> FROM <table 2> WHERE EXISTS (SELECT * FROM <table 2> WHERE <table 1>.<col 1> <operator> <table 1>.<col 1>)
SELECT DISTINCT store_type FROM stores WHERE EXISTS (SELECT * FROM cities_stores WHERE cities_stores.store_type = stores.store_type)
For example:SELECT * FROM <table 1> WHERE <col 1> IN (SELECT <col 1> FROM <table 2>)
SELECT * FROM Employee WHERE dept_id IN (SELECT DEPT_ID FROM TDWDEPT)
You can use characters or wildcards '%' and '_'. For example:SELECT * FROM <table 1> WHERE <col 1> LIKE <value>
SELECT * FROM Employee WHERE name LIKE 'J%'
For example:SELECT * FROM <table 1> WHERE <col 1> IS NULL
SELECT * FROM Employee WHERE ssn IS NULL
For example:SELECT * FROM <table 1> WHERE <col 1> BETWEEN <value> AND <value>
SELECT * FROM Employee WHERE delt_id BETWEEN 2 AND 3
For example:SELECT * FROM <table 1> WHERE <col 1> NOT <CONDITION> <value>
SELECT DISTINCT * from STATE s WHERE NOT EXISTS (SELECT ct.state_id from city ct where ct.state_id = s.state_id)
SELECT * FROM Employee WHERE dept_id NOT IN (SELECT DEPT_ID FROM TDWDEPT)
SELECT * FROM Employee WHERE name NOT LIKE 'J%'
SELECT * FROM Employee WHERE delt_id NOT BETWEEN 2 AND 3