Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7676643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:14:46+00:00 2026-05-31T17:14:46+00:00

I have a table (presentations) with these columns: PresentationTitle | Speaker1 | Speaker2 |

  • 0

I have a table (“presentations”) with these columns:

PresentationTitle | Speaker1 | Speaker2 | Speaker3

This works great for listing all of the presentation titles like this on my “Presentations” page:

Presentation Number One
  by:
  John Smith
  Pocahontas Smith
  John Rolfe

Presentation Number Two
  by:
  Grandmother Willow

Presentation Number Three
  by:
  Chief Powhatan
  Kocoum Derpyderpderp

But now, for my “Speakers” page, I need to list all of the speakers–independent of each other–in alphabetical order. Like this:

Chief Powhatan
Grandmother Willow
John Rolfe
John Smith
Kocoum Derpyderpderp
Pocahontas Smith

What’s the best way to do this?

Another note–In my real-life table, the speaker1 column has lots more columns attached to it– “middlename”, “lastname”, “headshot”, “age”… and speaker2 has “middlename2”, “lastname2”, “headshot2,” etc… I need to keep these pieces of info attached to those speakers.

Thanks in advance for helping a big noob like me 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:14:47+00:00Added an answer on May 31, 2026 at 5:14 pm

    You should rethink your database design. A better table layout would be something more like:

    CREATE TABLE presentations (
        presentationID INT,
        presentationTitle VARCHAR(200),
        PRIMARY KEY (presentationID)
    );
    
    CREATE TABLE speakers (
        speakerID INT,
        firstName VARCHAR(32),
        middleName VARCHAR(32),
        lastName VARCHAR(32),
        headshot BLOB,
        age TINYINT UNSIGNED,
        PRIMARY KEY (speakerID)
    );
    
    CREATE TABLE presentationSpeakers (
        presentationID INT,
        speakerID INT
    );
    

    Then you can do a query like this to list all speakers from a particular presentation in alphabetical order by first name:

    SELECT
        s.firstName,
        s.lastName
    FROM
        presentationSpeakers ps
        INNER JOIN presentations p ON ps.presentationID = p.presentationID
        INNER JOIN speakers s ON ps.speakerID = s.speakerID
    WHERE
        p.presentationTitle = 'Presentation Number One'
    ORDER BY
        s.firstName, s.lastName
    

    Or a query as simple as this for all speakers in alphabetical order by first name:

    SELECT firstName, lastName FROM speakers ORDER BY firstName, s.lastName
    

    This is better for many reasons. Having a bunch of extra columns for every speaker will be difficult to deal with (which is the trouble you’re having now), plus you’ll have a ton of columns which may not be used (depending on the number of speakers), which may waste space, and another big reason…what if you get a presentation in which there are more speakers than you have columns?

    My way is much more flexible and much easier to perform simple operations (like sorting). You can have any number of speakers for each presentation, and there is no wasted space taken up with unused columns.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose you have the tables Presentations and Events . When a presentation is saved
I have table with some fields that the value will be 1 0. This
I have table with 3 columns A B C. I want to select *
Assume I have some sections within my latex-beamer presentation. Some of these sections contain
I have created an HTML table with two columns. I want the first column
I have a table of rows and columns on an HTML-based entry form that
I have table inside a div tab. The table has 40 rows in it
I have table with 50 entries (users with such details like Name Surname Location
I have table rows of data in html being filled from a CGI application.
i have table structure with 3 colums (column1, column2, column3) and i want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.