Display Odd/ Even number of records?

1 Answer

Answer :

Odd number of records:
select * from emp where (rowid,1) in (select rowid, mod(rownum,2)
from emp);
Output:-
1
3
5
Even number of records:
select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp)
Output:-
2
4
6

Related questions

Description : Display the records between two range?

Last Answer : select rownum, empno, ename from emp where rowid in (select rowid from emp where rownum

Description : How you will avoid duplicating records in a query?

Last Answer : By using DISTINCT

Description : A query fetched 10 records How many times does a PRE-QUERY Trigger and POST-QUERY Trigger will get executed ?

Last Answer : PRE-QUERY fires once. POST-QUERY fires 10 times.

Description : Display the number value in Words?

Last Answer : SQL> select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp; the output like, SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP')) --------- ---------------------------------------- 800 ... ---------- 800 Rs. Eight Hundred only. 1600 Rs. One Thousand Six Hundred only. 1250 Rs. One Thousand Two Hundred Fifty only.

Description : what is a display item?

Last Answer : Display items are similar to text items but store only fetched or assigned values. Operators cannot navigate to a display item or edit the value it contains.

Description : What are the Built-ins to display the user-named editor?

Last Answer : A user named editor can be displayed programmatically with the built in procedure SHOW-EDITOR, EDIT_TETITEM independent of any particular text item.

Description : What are the built_ins used the display the LOV?

Last Answer : Show_lov List_values

Description : What buil-in routines are used to display editor dynamicaly?

Last Answer : Edit_text item show_editor LOV

Description : What are the display styles of an alert?

Last Answer : Stop, Caution, note

Description : To display the page no. for each page on a report what would be the source & logical page no. or & of physical page no.?

Last Answer : & physical page no.

Description : What are the different display styles of list items?

Last Answer : Pop_listText_listCombo box

Description : How do you display console on a window ?

Last Answer : The console includes the status line and message line, and is displayed at the bottom of the window to which it is assigned.To specify that the console should be displayed, set the console window form ... the name of any window in the form. To include the console, set console window to Null.

Description : Do you display pictures and other things of personal importance in odd places?

Last Answer : My sister got an autographed picture of Ronald Reagan when she was an intern in a California Department and Reagan was Governor. She keeps it in the guest bathroom as the most appropriate place.

Description : Is zero an odd or even number?

Last Answer : I think technically it’s even as it’s a multiple of 2 and therefore shares all the traits of even numbers.

Description : I am an odd number. When I remove a letter from the word, I become even. What is the value of my number? -Riddles

Last Answer : Seven. When I remove the s, I become even.

Description : 1. Write a program to take a number and print whether it is an odd number or even number. -Artificial Intelligence

Last Answer : num = int(input("Enter a number: ")) mod = num % 2 if mod > 0: print("This is an odd number.") else: print("This is an even number.")

Description : How to write a Python program (i)to calculate area of a circle and (ii)to find if a given number is even or odd. -Python

Last Answer : (i) # 1.Circle pi = 3.14 r = int(input("Please enter the Radius of the circle:")) area = pi*r*r print("Area of the circle is" + str(area) + "sq ms") (ii) # 2. Odd Number & Even Number Number = int( ... Number % 2 == 0): print("This is an Even Number") else: print("It's an Odd Number")

Description : I am an odd number. Take away a letter and I become even. What number am I? -Riddles

Last Answer : I am an odd number. Take away a letter and I become even. I am Seven.

Description : A number ending with a even number is it a odd or even number?

Last Answer : It is even

Description : Is 25 an odd number or an even number?

Last Answer : 25 is an odd number

Description : Is the sum of an even whole number and an odd whole number always odd?

Last Answer : Yes---------------------------------------------Let n be an integer. Then 2n is an even numberLet m be an integer. Then 2m is an even number and 2m + 1 is anodd number.Then:even + odd = (2n) + (2m + 1)= (2n + 2m) + 1= 2(n + m) + 1= 2k + 1 (where k = m + n) which is an odd number.

Description : suppose you roll a number cube 30 times write a ratio to describe the theoretical probability of rolling each of the following: (show all your work) 1,4,6,7 an even number an odd number please help I need this thankyou?

Last Answer : Please help NOW SOS

Description : The fatty acids containing even number and odd number of carbon atoms as well as the unsaturated fatty acids are oxidized by (A) α-oxidation (B) β-oxidation (C) ω-oxidation (D) All of these

Last Answer : Answer : B

Description : I am an odd number. Take away one letter and I become even. What number am I?

Last Answer : A: Seven (take away the “s’”and it becomes “even”).

Description : n2 – 1 is divisible by 8, if n is (a) an integer (b) a natural number (c) an odd integer (d) an even integer

Last Answer : (c) an odd integer

Description : If m and n are two odd prime numbers such that m (a) an even number (b) an odd number (c) an odd prime number (d) a prime number

Last Answer : (a) an even number

Description : While transmitting odd-parity coded symbols, the number of zeros in each symbol is a. odd b. even c. a and b both d. unknown

Last Answer : unknown

Description : A simpleparity-check code can detect__________ errors. A) an even-number of B) two C) no errors D) an odd-number of

Last Answer : an odd-number of

Description : A simple parity-check code can detect __________ errors A. an even-number of B. two C. no errors D. an odd-number of

Last Answer : D. an odd-number of

Description : In Newton's Ring experiments , the diameter of dark rings is proportional to A. Odd Natural numbers B. Natural Number C. Even Natural Number D. Square root of natural number

Last Answer : In Newton's Ring experiments , the diameter of dark rings is proportional to A. Odd Natural numbers B. Natural Number C. Even Natural Number D. Square root of natural number

Description : n Newton's Ring experiments , the diameter of bright rings is proportional to A. Square root of Odd Natural numbers B. Natural Number C. Even Natural Number D. Square root of natural number

Last Answer : B. Natural Number

Description : When an organisation sets a limited number of prices for selected groups of merchandise, this idea is commonly referred to as A)prestige pricing. B)price lining. C)customary pricing. D)odd-even pricing. E)ethical pricing.

Last Answer : B)price lining.

Description : Write a C++ program to find whether the entered number is even or odd.

Last Answer : #include<iostream.h> #include<conio.h> void main()  { int num; clrscr(); cout<<"\nEnter a Number "; cin>>num; if(num%2==0)  { cout<<"\nEntered ... else  { cout<<"\nEntered number is odd";  } getch();  }

Description : Write an algorithm to determine the given number is odd or even.

Last Answer : Step 1- Start Step 2- Read / input the number. Step 3- if n%2==0 then number is even. Step 4- else number is odd. Step 5- display the output. Step 6- Stop

Description : Draw flowchart for checking whether given number is even or odd. 

Last Answer : flowchart for checking whether given number is even or odd.  

Description : Write a program to create two threads one thread will print even no. between 1 to 50 and other will print odd number between 1 to 50.

Last Answer : import java.lang.*; class Even extends Thread { public void run() { try { for(int i=2;i<=50;i=i+2) { System.out.println("\t Even thread :"+i); sleep(500); } } ... public static void main(String args[]) { new Even().start(); new Odd().start(); } }

Description : Write a shell script to accept a number from user check whether number is even or odd.

Last Answer : 2 8

Description : What is used to identify whether a data word has an odd or even number of 1’s ? (1) Carry bit (2) Sign bit (3) Zero bit (4) Parity bit

Last Answer : Parity bit

Description : Have you ever known someone who did not know the rules for adding and multiplying even and odd numbers?

Last Answer : Just about anybody in Afghanistan, or Wahabis in Saudi Arabia. They think that is Satanic influence. Plus just about any student in American urban schools

Description : Hey : what ‘Odd Jobs’ have you taken that had a strange, unexpected, or even scary outcome?

Last Answer : I worked at a weird old college bookstore for a sweet 85-year old woman and her nasty, insulting husband. On the plus side, they were friends with Gabriel Garcia Marquez and I got to meet him.

Description : I am even, add one letter and I’m odd. What am I? -Riddles

Last Answer : Seven.

Description : I am a puzzle with a wordy facade. There's always an answer, even if it seems odd. Only the clever can understand my code. If you don't answer, then you'll never know. What am I? -Riddles

Last Answer : A riddle.

Description : In the Print dialog box, you can select the pages for printing. (a) Even pages (b) Odd pages (c) All pages in range (d) All of these -Technology

Last Answer : (d) You can select the even, odd and all pages in range for printing.

Description : is 81,203 even or odd

Last Answer : It is odd. Good luck

Description : cube root of a perfect even cube is ___________and the perfect odd cube is ______________

Last Answer : cube root of a perfect even cube is ___________and the perfect odd cube is ______________

Description : What is 47 even or odd?

Last Answer : odd

Description : Is 239 odd or even?

Last Answer : 239 is an odd number

Description : Is 194 odd or even?

Last Answer : 194 is an even number

Description : What is even times odd?

Last Answer : even

Description : Is the gcf of two odd numbers always even?

Last Answer : No not always as for example the GCF of 7 and 21 is 7