-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts sql finalizados #1
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parabéns pela entrega! 👏
*/ | ||
|
||
SELECT l.titulo AS LIVRO FROM livros l | ||
WHERE l.titulo LIKE '%java%'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e se tiver JAVA ou Java, funciona?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funciona, o LIKE por padrão não é case-sensitive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Legal, cuidado que isso não é uma verdade em todos os bancos de dados. No Oracle, até a versão 12c por exemplo, não é.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blz
|
||
CREATE TABLE IF NOT EXISTS emprestimos( | ||
id_e INT AUTO_INCREMENT NOT NULL, | ||
livro VARCHAR(17) NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
é legal ter uma referência de o que está usando do livro, usuário e outras FKs. Exemplo: ao invés de livro, poderia usar isbn_livro ou id_livro, pq só livro poderia ser qualquer coluna da tabela livro, geralmente o id, mas vale deixar explícito :)
No description provided.