Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Take Data in Table

Author  Topic 

innocent
Starting Member

3 Posts

Posted - 2009-10-19 : 08:13:23
Suppose I have a table for example

student

St_name , St_rool, St_fees
Ali , 1 , 1200
Amir , 2 , 1000
Umar , 3 ,3000
Asghar ,4 ,1000

now i want to take 1 3 and 4 row

so this query

select * from student
where st_rool in (1,3,4)

but if i dont know this and only take this colum how can i do this
what this query make?

Asghar Ali

innocent
Starting Member

3 Posts

Posted - 2009-10-19 : 08:18:19
this is flight table Feild

Aircraft_code , Aircode , Type , Source, Destination ,Category ,Dep_time , Journey_hrs

and his tuple

9W01 9W Airbus Cal Che D 15.30 3
9W02 9W Airbus Mun Del D 9.30 2
9W03 9W Airbus Che Mun D 10.45 2
AI01 AI Boeing Cal NY I 2.20 18
AI02 AI Boeing Mun NY I 1.30 20
AI03 AI Boeign Del Ny I 3.00 17
BA01 BA Boeing Mun Lon I 23.30 9
BA02 BA Boeing Del Lon I 2.15 11
BA03 BA Boeing Mun Ny I 3.30 20
IC01 IA Airbus Bang Che D 10.45 1
IC02 IA Airbus Bang Mun D 2.00 2
IC03 IA Boeing Del Cal D 17.45 1
ICo4 IA Beoing Mun Cal D 18.30 2


Asghar Ali
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2009-10-21 : 12:01:24
As far as you first post, you'll get exactly what you've asked for:

Ali , 1 , 1200
Umar , 3 ,3000
Asghar ,4 ,1000

Your second post, NICE data. No question but nice data.

Terry

-- Procrastinate now!
Go to Top of Page
   

- Advertisement -