SQL Flashcards

1
Q

What formats can be stored in database?

A

Text, Number, Date-time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Before deleting a record or records from a table

A

You MUST use a where statement

The record must not be referenced via its foreign key by any other entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which is the key used with SELECT to return only unique values?

A

DISTINCT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following would be the correct operator to use with a partial string match utilizing the wildcard?

A

Like

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which SQL statement is used to update data in a database?

A

UPDATE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

With SQL, how do you select all the columns from a table named ‘Persons’?

A

SELECT * FROM Persons

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

With SQL, how do you select all the records from a table named ‘Persons’ where the FirstName is equal to ‘Peter’?

A

SELECT * FROM Persons WHERE FirstName=’Peter’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

With SQL, how can you insert a new record into the ‘Persons’ table?

A

INSERT INTO Persons VALUES (‘Jimmy’,’Jackson’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly