Revision question

Posted on 2005-05-04
Last Modified: 2010-03-19
Please can someone help with these questions: -


Given the tables of a database below, write an sql statement which merges the author names and the names of the titles they have published into a new table. The result has to be sorted using the title names. The asterisks (*) indicate the primary keys. The relationships are ISBN (Titles) to ISBN (Author_title) as 1:n without referential integrity. Author_ID (Author_title) to Author_ID (Author) as n:1 with referential integrity.

Titles                               Author_title                     Author

(*)ISDN                           ISBN                          (*)Author_ID
title_name                        Author_ID                       Author_name  
Question by:lukegriffiths110
    LVL 28

    Expert Comment

    Is this homework?

    Author Comment

    nar it is exam revision. A question from a previouse paper. I am not sure if it is asking for select statement or a create statement.

    Author Comment

    or an insert
    LVL 9

    Expert Comment

    Here's that:

    select t.Title_name,A.author_name into Newtablename from titles t inner join author_title AT on t.ISDN=at.ISBN inner join author a on at.author_id=a.author_ID order by t.title_name

    LVL 44

    Accepted Solution

    We shouldn't give you the answer but put you in the right way.
    It's a SELECT INTO statement that you need to answer that question.

    Good luck

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now