Yes I want to have the columns come out in a sorted order without
specifying them like "select col1, col2, col3 from database" because I
have too many columns (close to 80).  Is there ways to select a table w/o
specifically telling the SQL server which ones I want?

Thanks!

Eric

On Tue, 20 Aug 2002, Bob Showalter wrote:

> > -----Original Message-----
> > From: Bob Showalter [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 20, 2002 2:24 PM
> > To: 'learn perl'; [EMAIL PROTECTED]
> > Subject: RE: SQL question
> >
> >
> > > -----Original Message-----
> > > From: learn perl [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, August 20, 2002 1:38 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: SQL question
> > >
> > >
> > > Hi guys,
> > >
> > > just wondering how to sort the columns in order using SQL.
> > > Does anybody
> > > have any clue?  for instance, my column headings are [1] [3]
> > > [2] [4] [2],
> > > is there a way to SELECT the table with the columns sorted in order?
> >
> > Look at your database's SQL documentation under "ORDER BY"
>
> Hmm, I read that question as "sort the rows". But if you mean "How do I get
> the columns to come out in a certain order?", that is controlled by the
> order in which you list them in your select clause.
>
> SELECT * FROM table will give you the columns in the order defined in the
> database. If you want a different order, you need to explicitly list the
> columns:
>
> SELECT col1, col3, col2, col4 FROM table
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to