Skip to content
Permalink
main
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
-- 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';