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

New No-Code Track! 🚀 New videos dropping every week—start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

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

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Community Projects
    • Live Sessions
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Community Projects Live Sessions Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • 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
  • 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.

    Treehouse

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

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.