0% found this document useful (0 votes)
8 views2 pages

SQL Practical Record

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

SQL Practical Record

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Practical Record Notes

Experiment 1: Database Creation and Query Execution in SQL

Aim:
To create tables for Project and Employee, insert data into them, and execute various
queries using SQL.

Algorithm/Procedure:
- Start the database management software (e.g., Oracle SQL Developer).

- Connect to the database using appropriate credentials.

- Write SQL commands to create tables as per the schema.

- Insert the given data into the tables.

- Execute the provided queries to perform operations like data retrieval and modification.

- Observe and record the results for each query.

SQL Code:
-- Table Creation

CREATE TABLE Project (


Projno NUMBER(5) PRIMARY KEY,
Location VARCHAR2(20),
Custname VARCHAR2(20),
Year NUMBER(4)
);

-- Data Insertion

INSERT INTO Project VALUES (1, 'Chennai', 'Vimal', 2005);


INSERT INTO Project VALUES (2, 'Coimbatore', 'Vijay', 2006);

-- Queries

SELECT * FROM Project;

Results:
**Output of Query: SELECT * FROM Project**
Projno Location Custname Year

1 Chennai Vimal 2005

2 Coimbatore Vijay 2006

Conclusion:
The "Project" and "Employee" tables were successfully created, data was inserted, and
queries were executed to manipulate and retrieve the data.

You might also like