commands Flashcards

1
Q

How to start MySQL in PuTTY?

A

mysql -p

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

to display catalog

A

show ________ ;

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

to open database

A

use ______;

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

to create a table

A

create table ________ (__, ___);

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

to delete table

A

drop table _______;

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

to create a field

A

insert into _______(__, __) values(__, __)

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

conditions in selecting

A

where ____=’__’;
order by asc/desc;
limit __;

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

show the table structure

A

describe ____;

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

add new field

A

alter table _____ add ______ varchar/int ();

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

rename field name/column

A

alter table _____ change _______ ________ varchar/int();

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

modify field attributed

A

alter table ______ modify _______ varchar / int();

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

delete field

A

alter table ________ drop ______;

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

rename table

A

alter table ____ rename to _______;

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

add primary key

A

alter table _______ add primary key (_______);

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

update record all or specific

A

update ________ set ______= ‘___’ where ______=’____’;

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

delete records

A

delete from ______ where ______=’___’;