Some MySQL questions

Some MySQL questions

am 08.10.2009 23:19:18 von John Oliver

1) When I select * from whatever; is there a way to have the results go
by one screen at a time?

2) In reference to the above, is there a way to just display the row
that shows the names of each column?

I need to drop one row from a table with a few thousand rows. I
guessing I want to:

delete from 'users' where = 1898;

Is that right? I'm not sure if COLUMN_NAME is "uid" or "id" or maye
something else, and since I can't pipe it through more or less... :-)

--
************************************************************ ***********
* John Oliver http://www.john-oliver.net/ *
* *
************************************************************ ***********

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Some MySQL questions

am 08.10.2009 23:33:34 von Carlos Proal

On 10/8/2009 4:19 PM, John Oliver wrote:
> 1) When I select * from whatever; is there a way to have the results go
> by one screen at a time?
>

You can limit output by delimiting your search ie

select * from users limit x,y;

x=offset
y=rows after the ofset

> 2) In reference to the above, is there a way to just display the row
> that shows the names of each column?
>

I guess you are talking about describe to show table attributes

describe users;

> I need to drop one row from a table with a few thousand rows. I
> guessing I want to:
>
> delete from 'users' where = 1898;
>
> Is that right? I'm not sure if COLUMN_NAME is "uid" or "id" or maye
> something else, and since I can't pipe it through more or less... :-)
>
>


Carlos


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Some MySQL questions

am 08.10.2009 23:44:40 von Nathan Sullivan

On Thu, Oct 08, 2009 at 02:33:34PM -0700, Carlos Proal wrote:
> On 10/8/2009 4:19 PM, John Oliver wrote:
> > 1) When I select * from whatever; is there a way to have the results go
> > by one screen at a time?
> >
>
> You can limit output by delimiting your search ie
>
> select * from users limit x,y;
>
> x=offset
> y=rows after the ofset
>
> > 2) In reference to the above, is there a way to just display the row
> > that shows the names of each column?
> >
>

You can also use a pager. On my Linux system I can type 'pager less' to use the less program to page through the results. Just type 'pager' to turn go back to normal.

> I guess you are talking about describe to show table attributes
>
> describe users;
>
> > I need to drop one row from a table with a few thousand rows. I
> > guessing I want to:
> >
> > delete from 'users' where = 1898;
> >
> > Is that right? I'm not sure if COLUMN_NAME is "uid" or "id" or maye
> > something else, and since I can't pipe it through more or less... :-)
> >
> >
>
>
> Carlos
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=nsullivan@cappex.com
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

RE: Some MySQL questions

am 09.10.2009 00:49:41 von Gavin Towey

Try the tutorial:

http://dev.mysql.com/doc/refman/5.0/en/tutorial.html

Regards,
Gavin Towey


-----Original Message-----
From: John Oliver [mailto:joliver@john-oliver.net]
Sent: Thursday, October 08, 2009 2:19 PM
To: mysql@lists.mysql.com
Subject: Some MySQL questions

1) When I select * from whatever; is there a way to have the results go
by one screen at a time?

2) In reference to the above, is there a way to just display the row
that shows the names of each column?

I need to drop one row from a table with a few thousand rows. I
guessing I want to:

delete from 'users' where =3D 1898;

Is that right? I'm not sure if COLUMN_NAME is "uid" or "id" or maye
something else, and since I can't pipe it through more or less... :-)

--
************************************************************ ***********
* John Oliver http://www.john-oliver.net/ *
* *
************************************************************ ***********

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgtowey@ffn.com


The information contained in this transmission may contain privileged and c=
onfidential information. It is intended only for the use of the person(s) n=
amed above. If you are not the intended recipient, you are hereby notified =
that any review, dissemination, distribution or duplication of this communi=
cation is strictly prohibited. If you are not the intended recipient, pleas=
e contact the sender by reply email and destroy all copies of the original =
message.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg