![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Using version 4.0.20a-nt under Win2K I need to pull distinct rows from a table and create a new table populated with those rows. This I can do with 'create table two select select distinct whatever from one'. However this only creates that column. I'd like to pull out ALL columns that have that distinct whatever. 'DISTINCT' only seems to work on one column. So I create a copy of the structure of the first table, 'create table two select * from table one where 1=0', then try to 'update' the columns in table two by setting them to the ones in the table one. No worky. I'm not sure if this is even doable in my version. Been reading 'MySQL' [DuBois] and O'Reilly's 'Managing & Using MySQL' but not had any luck. Can someone tell me if this is doable with my version, and if so, how? -- Amer Neely Home of Spam Catcher W: www.softouch.on.ca E: trudge@softouch.on.ca Perl | MySQL | CGI programming for all data entry forms. "We make web sites work!" | |||
| Featured Websites | ||||
|
![]() |
| Tags: copy, create, select, table, using |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| drop index gives me a "copy to tmp table" | Ask Josephsen | Database | 0 | 06-10-2007 12:22 AM |
| Why does 'SELECT * FROM countries' truncate characters and SELECT country FROM countries does not ? | PRS | Database | 0 | 05-31-2007 8:48 PM |
| enum can't create table | paul | Database | 1 | 05-31-2007 8:41 PM |
| Featured Websites | ||||
|