Code Monkey home page Code Monkey logo

database's Introduction

DataBase

Pesquisa de Verificação

Select * from products;

Utilizando < Select_1

SELECT * FROM products WHERE buyPrice < 100 ORDER BY buyPrice ASC;

Utilizando > Select_2

SELECT * FROM products WHERE buyPrice > 100 ORDER BY buyPrice ASC;

Utilizando >= Select_3

SELECT * FROM products WHERE buyPrice >= 100 ORDER BY buyPrice ASC;

Utilizando <= Select_4

SELECT * FROM products WHERE buyPrice <= 100 ORDER BY buyPrice ASC;

Utilizando != Select_5

SELECT * FROM products WHERE buyPrice != 100 ORDER BY buyPrice ASC;

Utilizando >= and <=

SELECT * FROM customers WHERE creditLimit >= 25000 AND creditLimit <= 100000 ORDER BY creditLimit ASC;

Utilizando >= and <=

SELECT * FROM customers WHERE creditLimit != 0 AND creditLimit <= 100000 ORDER BY creditLimit ASC;

Utilizando >= or <=

SELECT * FROM customers WHERE creditLimit = 25000 or creditLimit < 25000 ORDER BY creditLimit ASC;

Utilizando between

SELECT * FROM customers WHERE creditLimit BETWEEN 25000 AND 100000 ORDER BY creditLimit ASC;

Utilizando between

SELECT * FROM customers WHERE creditLimit BETWEEN 1 AND 100000 ORDER BY creditLimit ASC;

#SELECT COM ALTERAÇÃO DOS TITULOS DA TABELA COM ASC SELECT (firstName) AS 'NOME', (lastName) AS 'SOBRENOME', (email) AS 'E-mail' FROM employees ORDER BY NOME ASC;

#SELECT COM ALTERAÇÃO DOS TITULOS DA TABELA COM DESC SELECT (firstName) AS 'NOME', (lastName) AS 'SOBRENOME', (email) AS 'E-mail' FROM employees ORDER BY NOME DESC;

#VERIFICAÇÃO DE TABELA SELECT * FROM customers;

#SELECT COM ALTERAÇÃO DOS TITULOS DA TABELA COM ASC E LIKE SELECT (customerName) AS 'NOME', (contactLastName) AS 'SOBRENOME', (phone) AS 'CONTATO' FROM customers WHERE phone LIKE '+34%' ORDER BY NOME ASC;

#SELECT COM ALTERAÇÃO DOS TITULOS DA TABELA COM DESC E LIKE SELECT (customerName) AS 'NOME', (contactLastName) AS 'SOBRENOME', (phone) AS 'CONTATO' FROM customers WHERE phone LIKE '%55' ORDER BY NOME DESC;

#SELECT COM ALTERAÇÃO DOS TITULOS DA TABELA COM DESC E NOT LIKE SELECT (customerName) AS 'NOME', (contactLastName) AS 'SOBRENOME', (phone) AS 'CONTATO' FROM customers WHERE phone NOT LIKE '%55' ORDER BY NOME DESC;

#VERIFICAÇÃO DE TABELA SELECT * FROM products;

#VERIFICAÇÃO DE TABELA SELECT * FROM productlines;

SELECT COM INNER JOIN e

SELECT td.productName, td.productScale, td.buyPrice, tc.textDescription FROM products td INNER JOIN productlines tc ON td.productLine = tc.productLine ORDER BY td.productName ASC;

SELECT COM INNER JOIN e USING

SELECT td.productName, td.productScale, td.buyPrice, tc.textDescription FROM products td INNER JOIN productlines tc USING (productLine) ORDER BY td.productName ASC;

database's People

Contributors

vitor-ext avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.