MYSQL Flashcards

1
Q

What is it called when you add records to a table

A

Populate the table

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

What is a data base?

A

An organized collection of data

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

Display multiple things from multiple tables

A

Name of table.title1,title2,name of table.table1,table2

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

Change a field

A

ALTER TABLE tablename CHANGE name1 name2 VARCHAR(10);

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

What do you do to stuff in a data base?

A

Initialize

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

Show a table

A

SHOW TABLES;

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

Show a column

A

SHOW COLUMNS FROM dogs.nDogs

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

What is a primary key

A

A method that the DMS uses to select specific records

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

How to add a primary key

A

ALTER TABLE nFogs ADD PRIMARY KEY (sn);

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

Add a uni key

A

ALTER TABLE nDogs ADD UNIQUE (sn);

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

What is MUL

A

Not a primary or unique key. Multiple instances

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

Anchor tags

A
SELECT make FROM vehicle WHERE make REGEXP
'^(M|D)' beg M OR D
'(^M|D)' beg M con D 
'S$' end of word 
'A' anywhere
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Create a variable

A

SET @variable=100;

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

Remove a NULL field

A

DELETE FROM vehicle WHERE colour is NULL;

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

GROUP BY

A

SELECT make, model, FROM vehicle GROUP BY model;

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

Delete a record

A

DELETE FROM nDogs WHERE name=”name”;