Search Header Logo
sql class

sql class

Assessment

Presentation

Information Technology (IT)

12th Grade

Practice Problem

Medium

Created by

Ifan Sion

Used 1+ times

FREE Resource

55 Slides • 17 Questions

1

media

2

media

3

media

4

media

5

media

6

media

7

Fill in the Blanks

Type answer...

8

media

9

media

10

Multiple Select

Which of the following are examples of SQL data types?

1

INT

2

TEXT

3

BOOLEAN

4

STRING

11

media

12

media

13

media

14

Fill in the Blanks

Type answer...

15

Open Ended

Explain the purpose of the INSERT statement in SQL and how it is used to populate a table.

16

media

17

media

18

Multiple Choice

To update the name of the school with ID 1 to 'Hanlin', which SQL keyword should be used?

1

UPDATE

2

INSERT

3

DELETE

4

SELECT

19

media

20

Open Ended

Change your first entry so that it matches the following details: School_ID 1, School_name Hogwarts, School_build_date 2001, School_headmaster Dumbledor, School_Moto expelliarmus.

21

media

22

Multiple Choice

How can you correct a misspelled field name in an SQL table?

1

By using the ALTER TABLE command with RENAME

2

By deleting and recreating the table

3

By using the UPDATE command

4

By using the INSERT INTO command

23

media

24

media

25

Open Ended

Explain how the SCHOOL_ID field is used as a foreign key between the SCHOOL and DEPARTMENT tables.

26

Multiple Choice

What is the purpose of a foreign key in a relational database?

1

To uniquely identify each row in a table

2

To enforce referential integrity between tables

3

To store large amounts of data

4

To speed up queries

27

media

28

Multiple Choice

Which of the following is the correct syntax to create a foreign key in SQL?

1

FOREIGN KEY(SCHOOL_ID) REFERENCES SCHOOL(SCHOOL_ID)

2

PRIMARY KEY(SCHOOL_ID) REFERENCES SCHOOL(SCHOOL_ID)

3

ALTER TABLE SCHOOL ADD FOREIGN KEY(SCHOOL_ID)

4

CREATE FOREIGN KEY SCHOOL_ID REFERENCES SCHOOL

29

media

30

Fill in the Blanks

Type answer...

31

media

32

media

33

Multiple Choice

Which SQL keyword is used to query specific data from a database?

1

SELECT

2

QUERY

3

FIND

4

SEARCH

34

media

35

Multiple Choice

What would be the correct SQL statement to show all the names from the Department table?

1

SELECT Name FROM Department

2

SHOW Name FROM Department

3

GET Name FROM Department

4

SELECT Department FROM Name

36

media

37

Open Ended

Write the SQL needed to return the sizes of THE departments.

38

media

39

Fill in the Blanks

Type answer...

40

media

41

Multiple Choice

Which of the following SQL statements would return the names of all departments whose size is big?

1

SELECT Name FROM Department WHERE Size = 'big'

2

SELECT Size FROM Department WHERE Name = 'big'

3

SELECT Name FROM Department WHERE Size = 'small'

4

SELECT Department FROM Name WHERE Size = 'big'

42

media

43

Open Ended

Write the SQL needed to return the names of all schools that opened before 2011.

44

media

45

media

46

media

47

media

48

media

49

media

50

media

51

media

52

media

53

media

54

media

55

media

56

media

57

media

58

media

59

media

60

media

61

media

62

media

63

media

64

media

65

media

66

media

67

media

68

media

69

media

70

media

71

media

72

media
media

Show answer

Auto Play

Slide 1 / 72

SLIDE