Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Backend-Stuff-5001CEM/link.sql
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
20 lines (16 sloc)
686 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create table to store website components | |
CREATE TABLE website_components ( | |
component_id INT PRIMARY KEY, | |
page_name VARCHAR(255), | |
component_content TEXT | |
); | |
-- Insert data for home page | |
INSERT INTO website_components (component_id, page_name, component_content) | |
VALUES (1, 'home', 'Welcome to our website!'); | |
-- Insert data for community page | |
INSERT INTO website_components (component_id, page_name, component_content) | |
VALUES (2, 'community', 'Join our vibrant community discussions.'); | |
-- Read data for home page | |
SELECT * FROM website_components WHERE page_name = 'home'; | |
-- Read data for community page | |
SELECT * FROM website_components WHERE page_name = 'community'; |