<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PostgreSQL-Database%2FC2%2FInserting-and-Retrieving-Data%2FEnglish</id>
		<title>PostgreSQL-Database/C2/Inserting-and-Retrieving-Data/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PostgreSQL-Database%2FC2%2FInserting-and-Retrieving-Data%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PostgreSQL-Database/C2/Inserting-and-Retrieving-Data/English&amp;action=history"/>
		<updated>2026-05-17T15:52:00Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PostgreSQL-Database/C2/Inserting-and-Retrieving-Data/English&amp;diff=57427&amp;oldid=prev</id>
		<title>Madhurig at 14:05, 6 February 2026</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PostgreSQL-Database/C2/Inserting-and-Retrieving-Data/English&amp;diff=57427&amp;oldid=prev"/>
				<updated>2026-02-06T14:05:27Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:05, 6 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Title of the tutorial: '''Inserting and Retrieving Data'''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Title of the tutorial: '''Inserting and Retrieving Data'''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Author: EduPyramids&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Author&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;EduPyramids&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keywords: '''INSERT Script, INSERT''' '''statement''', '''Query Tool, Execute query''', '''SELECT''' '''query'''.''' Retrieving data,''' '''data redundancy''', '''EduPyramids, Video Tutorial.'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keywords: '''INSERT Script, INSERT''' '''statement''', '''Query Tool, Execute query''', '''SELECT''' '''query'''.''' Retrieving data,''' '''data redundancy''', '''EduPyramids, Video Tutorial.'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Madhurig</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PostgreSQL-Database/C2/Inserting-and-Retrieving-Data/English&amp;diff=57426&amp;oldid=prev</id>
		<title>Madhurig: Created page with &quot;Title of the tutorial: '''Inserting and Retrieving Data'''. Author: EduPyramids  Keywords: '''INSERT Script, INSERT''' '''statement''', '''Query Tool, Execute query''', '''SEL...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PostgreSQL-Database/C2/Inserting-and-Retrieving-Data/English&amp;diff=57426&amp;oldid=prev"/>
				<updated>2026-02-06T14:04:32Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Title of the tutorial: &amp;#039;&amp;#039;&amp;#039;Inserting and Retrieving Data&amp;#039;&amp;#039;&amp;#039;. Author: EduPyramids  Keywords: &amp;#039;&amp;#039;&amp;#039;INSERT Script, INSERT&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;statement&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Query Tool, Execute query&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;SEL...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Title of the tutorial: '''Inserting and Retrieving Data'''.&lt;br /&gt;
Author: EduPyramids&lt;br /&gt;
&lt;br /&gt;
Keywords: '''INSERT Script, INSERT''' '''statement''', '''Query Tool, Execute query''', '''SELECT''' '''query'''.''' Retrieving data,''' '''data redundancy''', '''EduPyramids, Video Tutorial.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|- &lt;br /&gt;
| align=center| '''Visual Cue'''&lt;br /&gt;
| align=center| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 1'''&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
|| Welcome to the Spoken tutorial on '''Inserting and Retrieving Data'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 2'''&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives '''&lt;br /&gt;
|| In this tutorial, we will learn to &lt;br /&gt;
* '''Insert''' data into a table and &lt;br /&gt;
* '''Retrieve''' data from a table.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 3'''&lt;br /&gt;
&lt;br /&gt;
'''System Requirements '''&lt;br /&gt;
|| To record this tutorial, I am using &lt;br /&gt;
* '''Ubuntu 24.04''' LTS&lt;br /&gt;
* '''Post gres Q L version 18 point 1''', and&lt;br /&gt;
* '''P g Admin 4 version 9 point 11'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 4'''&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites '''&lt;br /&gt;
&lt;br /&gt;
[https://edupyramids.org/ https://EduPyramids.org] '''&lt;br /&gt;
&lt;br /&gt;
|| To follow this tutorial, &lt;br /&gt;
* Learners should have '''Post gres Q L''' and '''p g Admin 4 '''installed in their systems.&lt;br /&gt;
* For the prerequisite '''Post gres Q L''' tutorials, please visit this website. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 5'''&lt;br /&gt;
&lt;br /&gt;
'''Code Files '''&lt;br /&gt;
&lt;br /&gt;
* '''ird-codes.txt'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| The following code file is required to practice this tutorial.&lt;br /&gt;
&lt;br /&gt;
This file is provided in the Code Files link on this tutorial page.&lt;br /&gt;
|- &lt;br /&gt;
|| Open pgAdmin&lt;br /&gt;
|| Let us open '''pgAdmin''' '''4.'''&lt;br /&gt;
|-&lt;br /&gt;
|| Show dashboardDouble click on Servers.Enter password: '''postgres'''&lt;br /&gt;
&lt;br /&gt;
Click''' OK'''&lt;br /&gt;
|| Please ensure that you are connected to the '''Localhost''' '''Post gres Q L '''server.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Studentdb'''&lt;br /&gt;
|| In the '''Browser '''pane, let us expand the '''Student d b''' database.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Schemas, '''then''' Public '''and''' '''then''' Tables'''.&lt;br /&gt;
|| Now let’s expand the '''Schemas''' node, '''public''' node and then '''Tables''' node.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''students''' table&lt;br /&gt;
|| Let us click on the '''students''' table.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Columns'''&lt;br /&gt;
|| Next let us click on the '''Columns''' node.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to columns&lt;br /&gt;
|| We can see the structure of the students table with its columns.&lt;br /&gt;
|- &lt;br /&gt;
|| Transition&lt;br /&gt;
|| Now let us insert data into this table.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click students&lt;br /&gt;
|| Let me right click on the '''students''' table.&lt;br /&gt;
|- &lt;br /&gt;
|| Select Scripts → INSERT Script&lt;br /&gt;
|| Let us select '''Scripts. '''&lt;br /&gt;
&lt;br /&gt;
A submenu list opens&lt;br /&gt;
&lt;br /&gt;
From the submenu select''' INSERT Script'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Query Tool opens&lt;br /&gt;
|| The''' Query Tool '''window opens with a default '''INSERT''' statement.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 6: '''&lt;br /&gt;
&lt;br /&gt;
'''INSERT Statement '''&lt;br /&gt;
&lt;br /&gt;
'''INSERT INTO table(column1,column2...)'''&lt;br /&gt;
&lt;br /&gt;
'''VALUES (value1, value2,...);'''&lt;br /&gt;
&lt;br /&gt;
Highlight according to narration&lt;br /&gt;
|| The '''Insert statement''' inserts one or more rows into a '''table'''.&lt;br /&gt;
&lt;br /&gt;
The inserted values must match column order and data type of each column.&lt;br /&gt;
&lt;br /&gt;
That is column 1 takes the value 1 and column 2 takes the value 2 and so on.&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight syntax&lt;br /&gt;
|| The column names must follow the same order as the values.&lt;br /&gt;
|- &lt;br /&gt;
|| Type:&lt;br /&gt;
&lt;br /&gt;
'''INSERT INTO students (student_name, city, gender, date_of_birth, cgpa)'''&lt;br /&gt;
&lt;br /&gt;
'''VALUES ('Ram', 'Mumbai', 'Male', '1996-10-23', 9.6);'''&lt;br /&gt;
|| Please delete the default '''INSERT''' statement before typing the new query.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us type the following query in the query window to insert a row.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s drag the boundary to see the query clearly.&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight values Ram, Mumbai and Male.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the numeric value.&lt;br /&gt;
|| Observe that character values are enclosed within single quotes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here numeric values are not enclosed in quotes.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Execute query''' button.&lt;br /&gt;
&lt;br /&gt;
Show the tool tip.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the Execute query pop window.&lt;br /&gt;
&lt;br /&gt;
Point to the message.&lt;br /&gt;
&lt;br /&gt;
Click the Continue button.&lt;br /&gt;
|| Let us now click on the '''Execute query''' button on the toolbar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Execute query window opens with a message Do you want to run this query-&lt;br /&gt;
&lt;br /&gt;
Click the '''Continue''' button to run the query.&lt;br /&gt;
|- &lt;br /&gt;
|| Success message&lt;br /&gt;
|| A message '''Query returned successfully''' appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Select and press delete key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Type: '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''INSERT INTO students '''&lt;br /&gt;
&lt;br /&gt;
'''(student_name, city, gender, date_of_birth, cgpa)'''&lt;br /&gt;
&lt;br /&gt;
'''VALUES '''&lt;br /&gt;
&lt;br /&gt;
'''('Kishore', 'Mumbai', 'Male', '1996-08-09', 8.5);'''&lt;br /&gt;
|| I will insert one more row in the same way.&lt;br /&gt;
&lt;br /&gt;
Please delete the last command before typing the new command.&lt;br /&gt;
&lt;br /&gt;
Let me type the following query.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Execute query''' button.&lt;br /&gt;
&lt;br /&gt;
Point to the Don’t ask again check box on the left.&lt;br /&gt;
&lt;br /&gt;
|| Let us click on the '''Execute query''' button to run the query. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will check the '''Don't ask again''' check box to prevent the pop-up from appearing on every query execution.&lt;br /&gt;
&lt;br /&gt;
Click Continue in the pop up box.&lt;br /&gt;
|- &lt;br /&gt;
|| Transition&lt;br /&gt;
|| Now let us retrieve the inserted data.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''SELECT * FROM students;'''&lt;br /&gt;
|| Type '''SELECT asterisk FROM students semicolon.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Execute query''' button.&lt;br /&gt;
|| Let me execute the query again.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the Output pane&lt;br /&gt;
|| The output is displayed in a tabular format.&lt;br /&gt;
&lt;br /&gt;
Let’s drag the boundary to see the table clearly&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
'''Syntax: Insert - Multiple row'''&lt;br /&gt;
&lt;br /&gt;
'''INSERT INTO table(column1,column2...)'''&lt;br /&gt;
&lt;br /&gt;
'''VALUES (value1, value2,...),'''&lt;br /&gt;
&lt;br /&gt;
'''(value1, value2,...),'''&lt;br /&gt;
&lt;br /&gt;
'''…..;'''&lt;br /&gt;
&lt;br /&gt;
|| This syntax is used to insert multiple rows in a single''' INSERT '''statement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each set of values inside the parentheses represent one row.&lt;br /&gt;
&lt;br /&gt;
These rows are separated by commas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The values in each row must match both the column order and the specified data type.&lt;br /&gt;
|- &lt;br /&gt;
|| '''INSERT into students(student_name, city, gender, date_of_birth,cgpa)'''&lt;br /&gt;
&lt;br /&gt;
'''Values ('Ram','Chennai','Male','1995-11-21', 9.2), ('Kishore','Mumbai','Male','1996-08-09', 8.5),'''&lt;br /&gt;
&lt;br /&gt;
'''('Pooja','Pune','Female','1995-03-25', 9.2);'''&lt;br /&gt;
|| Now let me type this INSERT statement.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Execute query''' button.&lt;br /&gt;
|| Let us execute the query again.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the message&lt;br /&gt;
|| The message shows '''3 rows.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''Select * from students;'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''Execute query''' button.&lt;br /&gt;
|| Let us retrieve the data again using a '''SELECT''' query.&lt;br /&gt;
&lt;br /&gt;
Let us execute the query.&lt;br /&gt;
|- &lt;br /&gt;
|| Drag the boundary to see the table.&lt;br /&gt;
&lt;br /&gt;
Highlight Duplicate names&lt;br /&gt;
&lt;br /&gt;
|| Let us drag the boundary to see the entire table &lt;br /&gt;
&lt;br /&gt;
The table contains multiple students with the same name.&lt;br /&gt;
&lt;br /&gt;
So the student names are not unique.&lt;br /&gt;
&lt;br /&gt;
This causes '''data redundancy'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the data.&lt;br /&gt;
|| How can we uniquely identify each student?&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| We will learn more about data redundancy in the next tutorial.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Save File''' icon on the toolbar.&lt;br /&gt;
|| Let us save the file.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Save File''' icon on the toolbar.&lt;br /&gt;
|- &lt;br /&gt;
|| Save the file as '''insertscript-student.sql'''&lt;br /&gt;
|| Save file window opens&lt;br /&gt;
&lt;br /&gt;
Type the Name as '''insert script hyphen student dot s q l'''.Now click on the '''Save '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| With this, we come to the end of this tutorial.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 8'''&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we learnt to &lt;br /&gt;
* '''Insert''' data into a table &lt;br /&gt;
* '''Retrieve''' data from a table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Let us summarise.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 9'''&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
&lt;br /&gt;
* Insert five records in the Emp table created in the previous assignment &lt;br /&gt;
* Retrieve the data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| As an Assignment, Please do the following.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 10 '''&lt;br /&gt;
&lt;br /&gt;
'''Thank you.'''&lt;br /&gt;
|| This Spoken Tutorial is brought to you by EduPyramids Educational Services Private Limited SINE IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Madhurig</name></author>	</entry>

	</feed>