SQL Flashcards

1
Q

What is SELECT’s function

A

To return data, it requires SELECT and then the feild name, FROM which is the table, WHERE which is which row(s) you want to access.

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

What is WHERE’s purpose?

A

To limit the results down to what you want, e.g. WHERE PrimaryKey = x when you want a specific items details

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

what is FROM’s purpose?

A

To identify which table you want to access this data from

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

What is AND’s purpose?

A

To add another requirement to the queary and its part of the where function

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

What is UPDATES function?

A

To update data, it requires UPDATE which acts like the FROM, SET which is what you are doing to the data, and WHERE which is where the data you want change is

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

What is DELETE’s function

A

To delete a row of data, it requires DELETE FROM which acts like the FROM, and WHERE which is where you want the data to be deleted

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

What is inserts function?

A

To add data to a table, it requires INSERT INTO which is then followed by the table name like a FROM, and then VALUES and then the data you want adding.

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

How do you create a table

A

CREATE TABLE (tableName)(
(fieldName) (dataType)
PRIMARY KEY (fieldName)
)

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

How do you use ORDER BY

A

slap it on the end of a queary e.g. ORDER BY (fieldName) ASC -for ascending or DESC for decending-

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