Registro da Tabela ‘cursos’
idcurso |
nome |
descricao |
carga |
totaulas |
ano |
1 |
HTML4 |
… |
40 |
37 |
2014 |
2 |
Algoritmos |
… |
20 |
15 |
2014 |
3 |
Photoshop |
… |
10 |
8 |
2014 |
4 |
PGP |
… |
40 |
20 |
2010 |
5 |
Jarva |
… |
10 |
29 |
2000 |
6 |
MySQL |
… |
30 |
15 |
2016 |
7 |
Word |
… |
40 |
30 |
2016 |
8 |
Sapateado |
… |
40 |
30 |
2018 |
9 |
Cozinha Árabe |
… |
40 |
30 |
2018 |
10 |
YouTube |
… |
5 |
2 |
2018 |
Modificando Linhas Incorretas
update cursos
set nome = 'HTML5'
where idcurso = '1';
update cursos
set nome = 'PHP', ano = '2015'
where idcurso = '4';
update cursos
set nome = 'Java', carga = '40', ano = '2015'
where idcurso = '5'
LIMIT 1;
idcurso |
nome |
carga |
ano |
1 |
HTML4 |
40 |
2014 |
4 |
PGP |
40 |
2010 |
5 |
Jarva |
10 |
2000 |
Removendo uma Linha
delete from cursos
where idcurso = '8';
delete from cursos
where ano = '2018'
Removendo TODAS as Linhas
truncate table cursos;
DDL → Data Definition Language
create database
create table
alter table
drop table
DML → Data Manipulation Language
insert into
update
delete
truncate