Check out example codes for "select 1 from orders". It will help you in understanding the concepts better.

Code Example 1

select 1 from table will return the constant 1 for every row of the table. It's useful when you want to cheaply determine if record matches your where clause and/or join.

Learn ReactJs, React Native from akashmittal.com