Notes
SQL Server
Content of the notes (1)
Page 1
2.1
SELECT tabela_pessoa.id, tabela_evento.evento
FROM tabela_pessoa
INNER JOIN tabela_evento
ON tabela_pessoa.id = tabela_evento.pessoa_id;
2.2
SELECT nome
FROM tabela_pessoa
WHERE nome LIKE '%Doe%';
2.3
INSERT INTO tabela_evento (evento)
values ( 'Lisa Romero');
2.4
UPDATE tabela_evento
SET pessoa_id = 5
WHERE pessoa_id = "NULL";
2.5
DELETE From tabela_evento
WHERE evento = "Evento D";
2.6
DELETE From tabela_pessoa
WHERE pessoa_id = "NULL";
2.7
ALTER tabela_pessoa
ADD idade int;
2.8
CREATE TABLE tabela_telefone (
id int PRIMARY KEY,
telefone varchar(200),
pessoa_id int FOREIGN KEY );
2.9
ALTER TABLE tabela_telefone
MODIFY COLUMN telefone UNIQUE;
2.10
DROP TABLE tabela_telefone;
Information
- Description
- Note on SQL Server , created by Agnaldo Gonçalves on 07/02/2021.
- Created by
- Agnaldo Gonçalves · Feb 2021
- Updated
- Feb 8, 2021
- Views
- 1
- Rating