News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Online Test ASP.NET with SQL Server

CREATE TABLE Orders (         

OrderID Int IDENTITY NOT NULL,        

 SalesPersonID Int NOT NULL,        

 RegionID Int NOT NULL,         

OrderDate Datetime NOT NULL,         

OrderAmount Int NOT NULL )

Which statement will produce the report correctly?

  1. SELECT TOP 5 OrderAmount, SalesPersonID FROM orders

  2. SELECT TOP 5 OrderAmount, SalesPersonID FROM orders ORDER BY OrderAmount DESC

  3. SELECT TOP 5 WITH TIES OrderAmount, SalesPersonID From Orders

  4. SELECT TOP 5 WITH TIES OrderAmount, SalesPersonID From Orders ORDER BY OrderAmount

Answer: Answer is b
Further Reading:

The company need the highest sate amount. So we need to order amount in DESC order. Useful resources, TOP, WITH TIES


  1. Functions and Parenthesis

  2. Multiplication, Division and Exponents

  3. Addition and Subtraction

  4. Logical Operations

Answer: Answer is a
Further Reading:

Useful resources, Operator Precedence (Transact-SQL)


  1. DEFAULT and NOT NULL constraints

  2. FOREIGN KEY constraints

  3. PRIMARY KEY and UNIQUE constraints

  4. IDENTITY columns

  5. CHECK constraints

Answer: Answer is c
Further Reading:

Useful resources, Constraints


  1. primary query -> sub query -> sub sub query and so on

  2. sub sub query -> sub query -> prime query

  3. the whole query is interpreted at one time

  4. there is no fixed sequence of interpretation, the query parser takes a decision on the fly

Answer: Answer is b
Further Reading:

Primary query results depend on the sub query results, so sub query my execute first then primary query will execute.   Useful resources, Subquery Fundamentals


Each student can enroll into more than one class. Each class can accommodate more than one student.

  1. 1 to N

  2. 1 to 1

  3. M to N to 1

  4. M to N

  5. N to 1

Answer: Answer is d
Further Reading:

Useful resources, Many-to-Many Data Relationships


  1. select * from Pers where joining_date from '1/1/2005' to '1/2/2005', job= 'Analyst' or 'clerk' or 'salesman'

  2. select * from Pers where joining_date between '1/1/2005' to '1/2/2005', job= 'Analyst' or job= 'clerk' or job= 'salesman'

  3. select * from Pers where joining_date between '1/1/2005' and '1/2/2005' and (job= 'Analyst' or 'clerk' or 'salesman')

  4. None of the above

Answer: Answer is d

  1. Character

  2. Binary

  3. Logical

  4. Date

  5. Numeric

  6. All are supported

Answer: Answer is c
Further Reading:

Useful resources, Data Types


  1. IN
  2. NOT
  3. AND
  4. OR
  1. 1,2,3,4

  2. 2,3,4,1

  3. 1,2,4,3

  4. 1,4,3,2

  5. 4,3,2,1

  6. 4,1,2,3

  7. 4,2,1,3

  8. 3,2,1,4

Answer: Answer is b
Further Reading:

Useful resources, Operator Precedence


  1. A select clause

  2. A where clause

  3. A from clause

  4. A group by clause

  5. A having clause

  6. An order by clause

Answer: Answer is a, c
Further Reading:

Useful resources, SQL Queries


  1. Purchased before November 11, 2002
  2. Price is less than $500 or greater than $900

You want to sort the result by the date of purchase, starting with the most recently bought book.

Which of the following statements should you use?

  1. SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date < '11/11/2002' ORDER BY purchase_date;

  2. SELECT book_title FROM books WHERE price IN (500, 900) AND purchase_date< '11/11/2002' ORDER BY purchase date ASC;

  3. SELECT book_title FROM books WHERE price < 500 OR>900 AND purchase_date DESC;

  4. SELECT Book_title FROM books WHERE (price < 500 OR price > 900) AND purchase_date < '11/11/2002' ORDER BY purchase date DESC

Answer: Answer is d
Further Reading:

Useful resources, WHERE Clause


Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;