Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Daniel Benisti
    Daniel Benisti
    1,466 Points

    What's wrong with my query?

    Posted March 3, 2024 4:40pm by Daniel Benisti
    Daniel Benisti
    1,466 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    0 Answers

  • Nameer Jamal
    Nameer Jamal
    309 Points

    Now recreate the MEMBERS table with the new FAVORITE_ROCK_ID column, and make sure it has a foreign key constraint to th

    Posted December 11, 2023 9:51am by Nameer Jamal
    Nameer Jamal
    309 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Nameer Jamal
    Nameer Jamal
    309 Points

    Now, in the MEMBERS table, we'd like to change the FAVORITE_ROCK column to be FAVORITE_ROCK_ID, and it should be a forei

    Posted December 11, 2023 9:21am by Nameer Jamal
    Nameer Jamal
    309 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Nameer Jamal
    Nameer Jamal
    309 Points

    create a table named ROCKS with the following columns: ID, NAME, TYPE, COLOR. And make sure that ID is a primary key.

    Posted December 11, 2023 9:01am by Nameer Jamal
    Nameer Jamal
    309 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Alexander Tomashevskiy
    Alexander Tomashevskiy
    8,326 Points

    Hello, Please help me, what wrong with my command?

    Posted April 29, 2023 1:59pm by Alexander Tomashevskiy
    Alexander Tomashevskiy
    8,326 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Fidelis Chime
    Fidelis Chime
    6,077 Points

    ADD FOREIGN KEY

    Posted March 13, 2023 5:42am by Fidelis Chime
    Fidelis Chime
    6,077 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Viktorija Kalniņa
    Viktorija Kalniņa
    1,652 Points

    My script shows error, can' t get it right

    Posted October 4, 2022 1:47pm by Viktorija Kalniņa
    Viktorija Kalniņa
    1,652 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    2 Answers

  • Alejandro Aburto Salazar
    Alejandro Aburto Salazar
    7,733 Points

    Adding foreign key not working

    Posted December 10, 2021 8:22am by Alejandro Aburto Salazar
    Alejandro Aburto Salazar
    7,733 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    2 Answers

  • Danial Syafiq
    Danial Syafiq
    9,168 Points

    error on challenge 3

    Posted October 14, 2021 4:11pm by Danial Syafiq
    Danial Syafiq
    9,168 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • keith gotohori
    keith gotohori
    46 Points

    how to create sql workspaces

    Posted April 14, 2021 8:52pm by keith gotohori
    keith gotohori
    46 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Roxanne Reyes
    Roxanne Reyes
    9,006 Points

    There's something wrong with this challenge. BUMMER IT'S NOT WORKING!

    Posted February 5, 2021 4:04pm by Roxanne Reyes
    Roxanne Reyes
    9,006 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Tadjiev Codes
    Tadjiev Codes
    9,626 Points

    What's wrong with my version?

    Posted May 26, 2020 11:30am by Tadjiev Codes
    Tadjiev Codes
    9,626 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    4 Answers

  • graciela cañete
    graciela cañete
    421 Points

    The exercise is doesn´t working

    Posted March 2, 2020 6:47pm by graciela cañete
    graciela cañete
    421 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    2 Answers

  • roy chen
    roy chen
    2,659 Points

    I think i did it right.

    Posted January 4, 2020 11:46pm by roy chen
    roy chen
    2,659 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Dharmesh Nayee
    Dharmesh Nayee
    1,090 Points

    Why does my foreign key constrant not work?

    Posted August 30, 2019 7:13pm by Dharmesh Nayee
    Dharmesh Nayee
    1,090 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    3 Answers

  • Francesco Sollitto
    Francesco Sollitto
    2,454 Points

    I HAVE ADDED THE PRIMARY KEY ON ID, WHY YOU KEEP REPEATING THE SAME BUMMER????

    Posted April 4, 2019 9:03am by Francesco Sollitto
    Francesco Sollitto
    2,454 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • YA Abidakadr
    PLUS
    YA Abidakadr
    Courses Plus Student 2,017 Points

    error

    Posted December 28, 2018 8:59am by YA Abidakadr
    YA Abidakadr
    Courses Plus Student 2,017 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Susan Tan
    Susan Tan
    381 Points

    my answer does not work

    Posted December 27, 2018 11:44pm by Susan Tan
    Susan Tan
    381 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Otec Perez Glass
    Otec Perez Glass
    7,678 Points

    Is not Working!

    Posted December 17, 2018 12:38am by Otec Perez Glass
    Otec Perez Glass
    7,678 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    3 Answers

  • Jorleni Maldonado
    Jorleni Maldonado
    14,398 Points

    Not sure what I'm missing here...

    Posted October 8, 2018 8:17pm by Jorleni Maldonado
    Jorleni Maldonado
    14,398 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Deborah Watson
    Deborah Watson
    2,614 Points

    Make sure you're creating all 4 columns: id, first_name, last_name, and favorite_rock_id.

    Posted July 18, 2018 8:25pm by Deborah Watson
    Deborah Watson
    2,614 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    2 Answers

  • Deborah Watson
    Deborah Watson
    2,614 Points

    FOREIGN KEY CONSTRAINT IN SQL LITE

    Posted July 17, 2018 6:06pm by Deborah Watson
    Deborah Watson
    2,614 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • tonyhan
    tonyhan
    31,188 Points

    CREATE TABLE ROCKS (ID PRIMARY KEY, NAME, TYPE, COLOR) doesn't seem to work, it just return's SQL Error

    Posted July 12, 2018 3:07am by tonyhan
    tonyhan
    31,188 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    2 Answers

  • Joshua Johnson
    Joshua Johnson
    702 Points

    Having trouble with task 3 of Creating and Modifying Database

    Posted July 6, 2018 1:52pm by Joshua Johnson
    Joshua Johnson
    702 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Peter Chukwukelu
    PLUS
    Peter Chukwukelu
    Courses Plus Student 833 Points

    Hello please help me with the syntax for creating this table "Rocks" in this challenge.

    Posted June 19, 2018 6:56pm by Peter Chukwukelu
    Peter Chukwukelu
    Courses Plus Student 833 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Peter Chukwukelu
    PLUS
    Peter Chukwukelu
    Courses Plus Student 833 Points

    SELECT md.ModelName, ca.VIN, ca.StickerPrice FROM Model AS md INNER JOIN car AS ca ON md.ModelID, md.MakeID = ca.CarID;

    Posted June 17, 2018 6:09pm by Peter Chukwukelu
    Peter Chukwukelu
    Courses Plus Student 833 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    1 Answer

  • Troy Erby
    Troy Erby
    6,332 Points

    Trouble inserting Primary Key

    Posted May 24, 2018 5:29pm by Troy Erby
    Troy Erby
    6,332 Points
    • Databases
    • Creating and Modifying Database Tables
    • Creating and Modifying Database Tables
    • Making Changes to a Database

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord