In: Computer Science
First, we created a table to store the Project name, and if the project is done or not by YES/NO.
SQL query-
CREATE TABLE projects ( project_No int,finished_project varchar(10), project_Name varchar(255), PRIMARY KEY (project_No) );
Query to retrieve each data store in the table:
select * from projects;
Query to show only those projects which are currently going on:
select * from projects where finished_project="NO";
OR
select project_No,project_Name from projects where finished_project="NO";
Query to retrieve only those projects which are completed-
select * from projects where finished_project="YES";
OR
select project_No,project_Name from projects where finished_project="YES";