GeekInterview.com
Series: Subject: Topic:
Question: 18 of 60

Database Tester generally used commands

What commands do database tester generally use & whether they are given privileges to the all tables to access?

Asked by: rajendra.tripathy | Member Since Apr-2008 | Asked on: Apr 12th, 2008

View all questions by rajendra.tripathy

Showing Answers 1 - 4 of 4 Answers
ashishks

Answered On : Aug 28th, 2009

View all answers by ashishks

The following are the most widely used Sql statments in database testing:
1. Use Database
2. Select
3. Insert
4. Update
5. Delete
6. Drop
7. Alter
8. Modify Structure
9. Join(Inner and outer)
10. Views
11. Commit
12. Roll Back
13. Set Transition on/off
14. Envoke
15. Grant

  
Login to rate this answer.
Test_Ne

Answered On : Sep 17th, 2009

View all answers by Test_Ne

The most common command is SELECT, selecting the record based on various conditions using JOIN statements. Also DECODE an CASE statements are used.

Insert and update commands are also used followed by commit command.

  
Login to rate this answer.

The Transact-SQL commands most often used by a tester are:

USE database_name
 SELECT column_names FROM table_name
SELECT DISTINCT column_name FROM table_name'
SELECT column_name FROM table_name WHERE condition
SELECT column_name FROM table_name WHERE condition1 AND condition2
SELECT column_name FROM table_name WHERE condition1 OR condition2
SELECT column_name FROM table_name WHERE column_name IN (value1, value2, ...)
SELECT column_name FROM table_name WHERE column_name BETWEEN value1 AND value2
SELECT column_name FROM table_name WHERE column_name LIKE pattern
SELECT column_name FROM table_name WHERE condition ORDER BY column_name [ASC, DESC]
SELECT AVG column_name FROM table_name
SELECT COUNT column_name FROM table_name
SELECT MAX column_name FROM table_name
SELECT MIN column_name FROM table_name
SELECT SUM column_name FROM table_name
SELECT column_name1 SUM column_name2 FROM table_name GROUP BY column_name1
SELECT column_name1 SUM column_name2 FROM table_name GROUP BY column_name1 HAVING arithmetic function condition
SELECT table_alias.column_name1 column_alias FROM table_name table_alias
SELECT table_alias.column_name1 AS column_alias FROM table_name AS table_alias

SELECT column_names FROM table_name1 JOIN table_name2 ON table_name1.join1 = table_name2.join2 WHERE condition
SELECT column_names FROM table_name1 INNER JOIN table_name2 ON table_name1.join1 = table_name2.join2 WHERE conditionSELECT column_names FROM table_name1 OUTER JOIN table_name2 ON table_name1.join1 = table_name2.join2 WHERE condition INSERT INTO table_name (column1, column2, …) VALUES (value1, value2, …) UPDATE table_name SET column1 = “new_value” WHERE conditionUPDATE table_name SET column1 = “new_value” WHERE condition1 AND condition2UPDATE table_name SET column1 = “new_value” WHERE condition1 OR condition2 

DELETE FROM table_name WHERE condition

  
Login to rate this answer.
dadhichi golla

Answered On : Feb 23rd, 2012

select ename,dept,sal from emp group by ename having dept order by sal

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.