Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Working with Tables X-No-Archive

42 views
Skip to first unread message

Skryptic

unread,
Jul 17, 2012, 5:50:38 PM7/17/12
to
I'm working on building my knowledge base with tables.

If I make two tables Person and Capital as follows using SQL:

Person (id integer, first char(20), last char(20), address char(50),
city char(30), state char(2), zip char(5))
Capital (state char(2), city char(30)

How could I create a list such that last names that start with ‘AB’, and is a list of last names only?

OR make a list such that all states and number of persons from Person table.
from each?

OR make one that list all people who live in the capital of their state?

Janis Papanagnou

unread,
Jul 17, 2012, 6:12:43 PM7/17/12
to
On 17.07.2012 23:50, Skryptic wrote:
> I'm working on building my knowledge base with tables.
>
> If I make two tables Person and Capital as follows using SQL:
>
> Person (id integer, first char(20), last char(20), address char(50),
> city char(30), state char(2), zip char(5))
> Capital (state char(2), city char(30)
>
> How could I create a list such that last names that start with �AB�, and is a list of last names only?

Maybe by something like

SELECT last FROM Person WHERE last LIKE 'AB%';


But what has an SQL question to do with this newsgroup which is about Unix shells?

Janis

Thomas 'PointedEars' Lahn

unread,
Jul 18, 2012, 9:59:33 AM7/18/12
to
Janis Papanagnou wrote:

> But what has an SQL question to do with this newsgroup which is about Unix
> shells?

They posted via Google Groups with `X-No-Archive' in the *Subject* header
field value, and too long lines. What do you expect? :->

--
PointedEars, filtering out almost all Google Groups postings

Please do not Cc: me. / Bitte keine Kopien per E-Mail.
0 new messages