Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Project Associate fresher Software Development

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

Q1. Which answer is NOT a type of table index?

a)

nonclustered

b)

unique

c)

heap

d)

hash

2.

Q2. The keywords AND, IN, LIKE, and BETWEEN belong to a category called what?

a)

joining operations

b)

linking operations

c)

criteria operations

d)

logical operations

3.

Q3. What is the result of this series of statements?

sql

Copy

BEGIN TRY

SELECT 'Foo' AS Result;

END TRY

BEGIN CATCH

SELECT 'Bar' AS Result;

a)

Foo

b)

FooBar

c)

Foo Bar

d)

Bar

4.

Q4. Which query generates a listing showing student names and department office

locations?

a)

SELECT Students.first_name, Students.last_name,

Departments.office_location FROM Students, Departments;

b)

SELECT Students.first_name, Students.last_name,

Departments.office_location FROM Students JOIN Departments ON

Students.department = Departments.department;

c)

SELECT Students.first_name, Students.last_name,

Departments.office_location FROM Students JOIN Departments;

d)

SELECT Students.first_name, Students.last_name,

Departments.office_location FROM Students ON Students.department =

Departments.department;

5.

Q5. What is an example of a DDL command in SQL?

a)

TRUNCATE TABLE

b)

DELETE

c)

MERGE

d)

DROP

6.

Q6. What is the result of SELECT FLOOR(-1234.321)?

a)

-1234.3

b)

-1234

c)

-1235

d)

1234.321

7.

Q7. Which data type is an approximate numeric?

a)

real

b)

bit

c)

decimal

d)

numeric

8.

Q8. What is the result of SELECT 1 / 2 AS Result?

a)

0.5

b)

error

c)

0

d)

1

9.

Q9. Which data type efficiently stores a person's age in years?

a)

float

b)

int

c)

tinyint

d)

bigint

10.

Q10. What is the result of SELECT 'abc\ def' AS Result?

a)

abc\def

b)

abcdef

c)

error

d)

abc def

11.

Q11. How do you select a random student from a table?

a)

SELECT TOP(1) first_name, last_name FROM Students ORDER BY

NEWID();

b)

SELECT TOP(1) RAND(first_name, last_name) FROM Student;

c)

SELECT TOP(1) first_name, last_name FROM Student;

d)

SELECT TOP(1) first_name, last_name FROM RAND(Student);

12.

Q12. What is the result of SELECT 123 + '123' AS Result?

a)

123'123'

b)

error

c)

246

d)

123123

13.

Q13. Which keyword combines SELECT statements, removing duplicates?

a)

DEDUPE

b)

SELECT

c)

MERGE

d)

UNION

14.

Q14. What does a RIGHT JOIN ensure?

a)

Only records from the rightmost table are displayed.

b)

All records from the rightmost table are represented, even without matches.

c)

Records from the rightmost table are displayed only if they match the left table.

d)

No records from the rightmost table are displayed if unmatched.

15.

Q15. Which statement removes all data from a table but keeps the schema?

a)

TRUNCATE TABLE Students;

b)

DELETE FROM Students;

c)

DROP TABLE Students;

d)

REMOVE * FROM Students;

16.

Q16. What is the result of SELECT 123 + 'abc' AS Result?

a)

123abc

b)

error

c)

'123abc'

d)

123'abc'

17.

Q17. Which statement creates a new database schema named Sales with Sharon as

the owner?

a)

ALTER USER Sharon WITH DEFAULT_SCHEMA = Sales;

b)

CREATE SCHEMA Sales AUTHORIZATION Sharon;

c)

ALTER USER Sharon SET SCHEMA Sales;

d)

CREATE SCHEMA Sales SET OWNER Sharon;

18.

Q18. How many rows result from a CROSS JOIN between tables with 4 and 5 rows?

a)

1024

b)

20

c)

0

d)

9

19.

Q19. Which WHERE clause finds SerialNumber ending with "10_3"?

a)

WHERE SerialNumber LIKE '%10_3'

b)

WHERE SerialNumber LIKE '%10[__]3'

c)

WHERE SerialNumber LIKE '%10"__"3'

d)

WHERE SerialNumber LIKE ('%10'+"__"+'3')

20.

Q20. What is the default join type if not specified?

a)

INNER

b)

RIGHT

c)

LEFT

d)

FULL

21.

Q21. How many bytes does the int data type consume?

a)

1

b)

2

c)

4

d)

8

22.

Q22. Which statement deletes the Inventory table from the Products database?

a)

DROP TABLE Products.Inventory;

b)

USE Products; DROP TABLE Inventory;

c)

USE Products; DELETE Inventory;

d)

USE Products.Inventory; DROP TABLE Inventory;

23.

Q23. Which clause must accompany TOP to predictably indicate affected rows?

a)

GROUP BY

b)

HAVING

c)

WHERE

d)

ORDER BY

24.

Q24. Which data type stores dates with time zone information?

a)

datetimeoffset

b)

smalldatetime

c)

datetime

d)

datetime2

25.

Q25. What is the result of SELECT 123 + '123' AS Result?

a)

123'123'

b)

error

c)

246

d)

123123

26.

Q26. Which operator returns true if two compared values are not equal?

a)

<>

b)

!==

c)

==!

d)

--

27.

Q27. How is forEach different from for?

a)

Only for uses a callback.

b)

forEach is mainly for arrays; for is generic.

c)

Only forEach lets you specify an iterator.

d)

forEach is generic; for is only for arrays.

28.

Q28. What is the output of console.log(typeof 42)?

a)

'float'

b)

'value'

c)

'number'

d)

'integer'

29.

Q29. Which method converts JSON to a JavaScript object?

a)

JSON.fromString()

b)

JSON.parse()

c)

JSON.toObject()

d)

JSON.stringify()

30.

Q30. What is the output of [] == []?

a)

true

b)

false

c)

undefined

d)

error

31.

Q31. Which variable-defining keyword allows hoisting?

a)

let

b)

const

c)

var

d)

All of them

32.

Q32. What is the output of console.log(y) if const y = x ? 'One' : 'Two' and

const x = 6 % 2?

a)

'One'

b)

'Two'

c)

undefined

d)

error

33.

Q33. Which collection allows unique values only?

a)

Object

b)

Set

c)

Array

d)

Map

34.

Q34. What is the output of console.log([...'hello'])?

a)

['h', 'e', 'l', 'l', 'o']

b)

'hello'

c)

error

d)

['hello']

35.

35. What will "Hello".charAt(1) return?

a)

H

b)

e

c)

l

d)

o

36.

36. Which keyword is used to prevent a method from being overridden?

a)

static

b)

final

c)

const

d)

private

37.

37. What is the default value of a boolean in Java?

a)

true

b)

false

c)

0

d)

null

38.

38. Which operator is used for bitwise AND in Java?

a)

&

b)

&&

c)

|

d)

^

39.

39. What will 5 / 2 evaluate to in Java?

a)

2.5

b)

2

c)

3

d)

2.0

40.

40. What does Math.ceil(4.2) return?

a)

4

b)

5

c)

4.2

d)

3

41.

41. How do you declare an abstract method?

a)

public abstract void method();

b)

public void method() {}

c)

public void abstract method();

d)

public abstract method() {}

42.

42. What does s.equalsIgnoreCase("Hello") return if s = "hello"?

a)

true

b)

false

c)

null

d)

Error

43.

43. What will "hello".length() return?

a)

4

b)

5

c)

6

d)

Error

44.

44. How do you create an instance of a class named Car?

a)

Car car();

b)

new Car();

c)

Car = new Car();

d)

Car car = new Car();

45.

45. What will System.out.println(3 == 3.0); print?

a)

true

b)

false

c)

Error

d)

Null

46.

46. What will Integer.parseInt("123") return?

a)

123

b)

"123"

c)

Error

d)

Null

47.

47. How do you correctly define a main method in Java?

a)

public static void main()

b)

public static void main(String args)

c)

public static void main(String[] args)

d)

void main(String[] args)

48.

48. Which collection does not allow duplicate elements?

a)

List

b)

ArrayList

c)

Set

d)

Queue

49.

49. What is the size of an int in Java?

a)

2 bytes

b)

4 bytes

c)

8 bytes

d)

Depends on system

50.

50. Which of these is a wrapper class?

a)

int

b)

double

c)

Integer

d)

void