SQL Objective Question And Answers

                                                                                             

1)      Which of the following SQL clauses is used to DELETE data from a database table?

1)      REMOVE
2)      CLEAR
3)      DROP DATA
4)      DELETE


2)      If you join a table to itself, what kind of join are you using?

1.      You can't join a table to itself.
2.      Selective Join.
3.      Self Join

3)      Which of the following SQL statements has correct syntax?

1.      SELECT * FROM Table1 WHERE Column1 => 10
2.      SELECT * FROM Table1 WHERE Column1 >= 10
3.      SELECT * FROM Table1 WHERE Column1 = = 10

4)      Sub-queries can be nested in…

1.      UPDATE, DELETE, INSERT and SELECT statements.
2.      INSERT statements only.
3.      DELETE statements only.
4.      UPDATE statements only.

5)      Which SQL functions is used to count the number of rows in a SQL query?

1.      COUNT()
2.      SUM()
3.      NUMBER()

6)      What does the UNION operator do?
1.      The UNION operator combines the results of two or more queries into a one result that includes all the rows from the queries in the union.
2.      The UNION operator sorts the selected result set.
3.      The UNION operator behaves the same as the JOIN SQL clause.


7)      The SQL BETWEEN operator …

1.      Specifies that a column is a primary key.
2.      Specifies which tables we are selecting from.
3.      Specifies a range to test.


8)      What does SQL stand for?


1.      Strict Query Language
2.      Standard Query Language.
3.      Structured Query Language.
4.      Strong Query Language


9)      If you don't specify ASC or DESC after a SQL ORDER BY clause, the following is used by default:


1.      ASC
2.      There is no default value.
3.      DESC


10)    Which of the following SQL statements is correct?


1.      SELECT CustomerName, COUNT(CustomerName) FROM Orders GROUP BY CustomerName
2.      SELECT CustomerName, COUNT(CustomerName) FROM Orders ORDER BY CustomerName

3.      SELECT CustomerName, COUNT(CustomerName) FROM Orders


                                                                  

Related Posts:

  • DataReader vs DataSet DataReader        I.            DatReader works on a Connection oriented architecture.     II.    &nb… Read More
  • SQL SQLObjective type Questions SQLObjective type Question and Answers Set 1  Click here 1.       What does SQL stand for? a.         Structured Query Language b. &… Read More
  • Difference between Store Procedure and Trigger? Difference between Store Procedure and Trigger? We can call stored procedure explicitly. But trigger is automatically invoked when the action defined in trigger is done.      ex: create trigger aft… Read More
  • SQL - Date and Time Functions Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 … Read More
  • Bubble Sort Bubble sort [string array] #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 50 #define N 2000 void sort_words(char *x[], int y); void swap(char **, char **); int main(void) {  … Read More

0 comments:

Post a Comment