suppose u hav 1 book with set...page 1-100 n 101 -200
now print page from 2-100 n 102 -200...
how we will do..?

Answers were Sorted based on User's Feedback



suppose u hav 1 book with set...page 1-100 n 101 -200 now print page from 2-100 n 102 -200... how..

Answer / rajesh venati

Actually i didn't get u r question exactly, As per above
question, it will also work

select page_no from book where page_no not in(1,101);

Is This Answer Correct ?    4 Yes 0 No

suppose u hav 1 book with set...page 1-100 n 101 -200 now print page from 2-100 n 102 -200... how..

Answer / tamilarasan

Say you have table with column "page_no" starts from 1 to
200.

Run the below query to get the desired answer

select page_no from book1 where mod(page_no,100) != 1

Is This Answer Correct ?    4 Yes 1 No

suppose u hav 1 book with set...page 1-100 n 101 -200 now print page from 2-100 n 102 -200... how..

Answer / tamilarasan

If you run this query select page_no from book1 where mod
(page_no,100) != 1

in a single column u will get the page nos as follows

RESULT
-------
2.
...
100
102
...
200

Is this the one you want?

Is This Answer Correct ?    4 Yes 1 No

suppose u hav 1 book with set...page 1-100 n 101 -200 now print page from 2-100 n 102 -200... how..

Answer / tarun

select page_no from book1 where page_no between 2 and 100 or
page_no between 102 and 200

Is This Answer Correct ?    3 Yes 0 No

suppose u hav 1 book with set...page 1-100 n 101 -200 now print page from 2-100 n 102 -200... how..

Answer / ankit

@ Tamilarasan

i wann to display both set of pages in single query...( i m
new in SQL...ONLY 2 MONTH exp.)

Is This Answer Correct ?    0 Yes 0 No

suppose u hav 1 book with set...page 1-100 n 101 -200 now print page from 2-100 n 102 -200... how..

Answer / ankit

@Tamilarasan

thanks working.....-)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

what are set operators in sql? : Sql dba

0 Answers  


write a query to delete similar records in particular fields(columns) in different tables

6 Answers   TCS,


What are schema-level triggers?

0 Answers  


what is constraining table?

2 Answers  


Is sql between inclusive?

0 Answers  






What is mdf ldf and ndf?

0 Answers  


Why do we need unique key in a table?

0 Answers  


Is sql sequential or random?

0 Answers  


What is the best partition size for windows 10?

0 Answers  


I have a table with 1 million records out of which 10,000 records are of unique records, then if I will implement index, then which type of index shall I use and why shall I use?

2 Answers   HSBC,


How to export the table data (this table having 18 million records) to .csv file. Please tell me is there any faster way to export the data.

8 Answers  


Why cross join is used?

0 Answers  


Categories