“Perbedaan antara dan antara di SQL” Kode Jawaban

Perbedaan antara dan antara di SQL

-- The difference is that BETWEEN will search for all the values that fall
-- between the mentioned lower and upper bound.
-- However, IN will only search for the mentioned list of values in your DB.

select Name from Student where Marks between 75 and 100
-- BETWEEN allows you to test if an expression is within a range of values
-- (inclusive). In our case the value has to be >=75 & <=100

select Name from Student where Marks in (75,80,85,90,95,100)
-- IN allows you to test if the expression matches any value
-- in the list of values.

-- NOTE: If a student has lets say 81 marks, they will appear after the
-- line having BETWEEN operator is executed, but not when the line having
-- IN operator is executed.
astr0n0mer

Perbedaan antara dan di mana di SQL

SELECT *
FROM facebook
JOIN linkedin
ON facebook.name = linkedin.name

SELECT *
FROM facebook
JOIN linkedin
WHERE facebook.name = linkedin.name

SELECT *
FROM facebook, linkedin
WHERE facebook.name = linkedin.name
Emmanuel Meli

Jawaban yang mirip dengan “Perbedaan antara dan antara di SQL”

Pertanyaan yang mirip dengan “Perbedaan antara dan antara di SQL”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya