Created
July 1, 2019 04:33
-
-
Save chriscarlsondev/db0ec03bc1ecca136f3d8b1a3cae272b to your computer and use it in GitHub Desktop.
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
-- First, remove the table if it exists | |
drop table if exists bookmarks; | |
-- Create the table anew | |
create table bookmarks ( | |
id INTEGER primary key generated by default as identity, | |
title VARCHAR(50) not null, | |
URL VARCHAR(50) not null, | |
description VARCHAR(300), | |
rating INTEGER not null | |
); | |
-- insert some test data | |
-- Using a multi-row insert statement here | |
insert into bookmarks (title, URL, description, rating) | |
values | |
('Google', 'http://www.google.com/','Search engine',5), | |
('Yahoo', 'https://www.yahoo.com','Unpopular search engine',2), | |
('CNN', 'http://www.cnn.com/','News web site',4), | |
('YouTube','http://www.youtube.com/','A place for videos',5), | |
('Facebook','http://www.facebook.com/','A social media platform',3), | |
('Wikipedia','http://www.wikipedia.org/','An encylopedia',5), | |
('Amazon','http://www.amazon.com/','An online retailer',2), | |
('Twitter','http:///www.twitter.com/','A social media platform for the birds',4), | |
('Reddit','http://www.reddit.com/','Online news and sharing site',3), | |
('Instagram','http://www.instagram.com/','A social media platform for photo sharing',5) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Execute these steps to create the database and run the script: