Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting ENTIRE Rows or columns with SQL

Status
Not open for further replies.

sdfasdf

IS-IT--Management
Jul 5, 2003
1
US
Lets say I want the user to open his own database..how do i select an ENTIRE ROW, and ENTIRE COLUMN?? for example if I had this:

Name Sex Height Age
Bob M 5'11 19
Mary F 6'11 17
Jenny F 4'10 17
Judy F 6'3 32

I want to select the entire first column: Bob M 5'11 19....and I also want to select the entire row: Bob, Mary, Jenny, Judy....and remember, I wont know the name of the rows and columns ahead of time, so i need a universal statement in SQL to do this.. thanks in advance!
 
Hiya,

What RDBMS system are you using? There are several ways, but you need to access system tables to do that you want, unless you want to resort to the good old

SELECT * FROM table_name
 
NOOO i dont want to resort to SELECT * FROM table_name...im using Microsoft SQL Server....accessing from visual c++ 6.0
 
OK,

I suggest that you repost this query in the MS SQL forum, you will find many good MS SQL people there.

Basically, you should be able to do it by building some dynamic SQL using system tables, such as sysobjects, syscolumns etc.

HTH

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top