<?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%2FNULL-Values-and-UPDATE-Statement%2FEnglish</id>
		<title>PostgreSQL-Database/C2/NULL-Values-and-UPDATE-Statement/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%2FNULL-Values-and-UPDATE-Statement%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PostgreSQL-Database/C2/NULL-Values-and-UPDATE-Statement/English&amp;action=history"/>
		<updated>2026-04-20T15:50:38Z</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/NULL-Values-and-UPDATE-Statement/English&amp;diff=57670&amp;oldid=prev</id>
		<title>Ketkinaina: Created page with &quot;'''Title of the Script: NULL Values and UPDATE Statement'''.  '''Author: Ketki Bhamble'''  '''Keywords: '''PostgreSQL, pgAdmin 4, Logical operators, AND, OR, NOT, WHERE, EduPy...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PostgreSQL-Database/C2/NULL-Values-and-UPDATE-Statement/English&amp;diff=57670&amp;oldid=prev"/>
				<updated>2026-04-20T07:44:04Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Title of the Script: NULL Values and UPDATE Statement&amp;#039;&amp;#039;&amp;#039;.  &amp;#039;&amp;#039;&amp;#039;Author: Ketki Bhamble&amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Keywords: &amp;#039;&amp;#039;&amp;#039;PostgreSQL, pgAdmin 4, Logical operators, AND, OR, NOT, WHERE, EduPy...&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 Script: NULL Values and UPDATE Statement'''.&lt;br /&gt;
&lt;br /&gt;
'''Author: Ketki Bhamble'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: '''PostgreSQL, pgAdmin 4, Logical operators, AND, OR, NOT, WHERE, EduPyramids, video tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|-&lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 1'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
|| Welcome to this Spoken Tutorial on''' NULL Values and UPDATE Statement'''.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 2'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives '''&lt;br /&gt;
|| In this tutorial, we will learn how to,&lt;br /&gt;
* Insert and Display '''Null''' values and &lt;br /&gt;
* '''UPDATE''' Statement&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 3'''&lt;br /&gt;
&lt;br /&gt;
'''System Requirements '''&lt;br /&gt;
* '''Ubuntu 24.04''' '''LTS'''&lt;br /&gt;
* '''PostgreSQL version 18.1''', and&lt;br /&gt;
* '''PgAdmin 4 version 9.11'''.&lt;br /&gt;
|| To record this tutorial, I am using the following setup.&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;
&lt;br /&gt;
&lt;br /&gt;
|| To follow this tutorial,&lt;br /&gt;
* Learners should have '''PostgreSQL''' and '''p g Admin 4.'''&lt;br /&gt;
* For the prerequisite '''PostgreSQL''' tutorials, please visit this website. &lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 5'''&lt;br /&gt;
&lt;br /&gt;
'''Code Files '''&lt;br /&gt;
&lt;br /&gt;
The following code file is required to practice this tutorial:&lt;br /&gt;
* '''nvu-commands.txt'''&lt;br /&gt;
&lt;br /&gt;
This file is provided in the Code Files link on this tutorial page.&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 of this tutorial page.&lt;br /&gt;
&lt;br /&gt;
Please download and extract the file.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Let us get started.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 6'''&lt;br /&gt;
&lt;br /&gt;
'''What is a NULL Value?'''&lt;br /&gt;
|| A '''null''' value is an unknown or missing value. &lt;br /&gt;
&lt;br /&gt;
If a field has no value it can be left blank as no data stored in it.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
'''Syntax of Null value'''&lt;br /&gt;
&lt;br /&gt;
'''SELECT column_names'''&lt;br /&gt;
&lt;br /&gt;
'''FROM table_name'''&lt;br /&gt;
&lt;br /&gt;
'''WHERE column_name IS NULL&amp;lt;nowiki&amp;gt;; &amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| This is the syntax to show a '''Null''' value.&lt;br /&gt;
&lt;br /&gt;
'''IS NULL''' clause checks for fields that have no stored values.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| I have opened the '''p g Admin 4 '''interface and connected to the localhost server.&lt;br /&gt;
|-&lt;br /&gt;
|| Type:''' INSERT INTO students (studentid, studentname, city, gender, dob, cgpa)'''&lt;br /&gt;
&lt;br /&gt;
'''VALUES ('S116', 'Ravi', 'Pune', 'M', NULL, NULL);'''&lt;br /&gt;
&lt;br /&gt;
Click the''' Execute query icon.'''&lt;br /&gt;
|| Let us insert a '''NULL''' value.For this, type the following query.&lt;br /&gt;
&lt;br /&gt;
Here the '''NULL''' keyword is used to insert null values. &lt;br /&gt;
&lt;br /&gt;
Let us execute the query.&lt;br /&gt;
&lt;br /&gt;
The query is returned successfully.&lt;br /&gt;
|-&lt;br /&gt;
|| Type: '''INSERT INTO students (studentid, studentname, city, gender)'''&lt;br /&gt;
&lt;br /&gt;
'''VALUES ('S117', 'Kiran', 'Pune', 'M');'''&lt;br /&gt;
&lt;br /&gt;
Click on the''' Execute query button'''.&lt;br /&gt;
&lt;br /&gt;
ADD ANNOTATION.( '''CGPA''' and '''DOB''' are automatically set to '''NULL''')&lt;br /&gt;
|| Type the following query and execute it. Here, '''C G P A''' and '''D O B columns''' are automatically set to '''NULL'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| We can add a '''NULL value''' by inserting a record without specifying its value.&lt;br /&gt;
|-&lt;br /&gt;
|| Type: '''SELECT * FROM students'''&lt;br /&gt;
&lt;br /&gt;
'''WHERE cgpa IS NULL;'''&lt;br /&gt;
|| Type the following query.&lt;br /&gt;
&lt;br /&gt;
Here we are using the I'''S NULL '''clause.&lt;br /&gt;
&lt;br /&gt;
Let us execute the query.&lt;br /&gt;
&lt;br /&gt;
The output displays details of students whose '''C G P A''' is currently not recorded.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Here, the '''D O B''' and '''C G P A''' values are not known. &lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Now let us see another example.&lt;br /&gt;
|-&lt;br /&gt;
|| Type: '''SELECT studentid, studentname'''&lt;br /&gt;
&lt;br /&gt;
'''FROM students'''&lt;br /&gt;
&lt;br /&gt;
'''WHERE cgpa IS NULL;'''&lt;br /&gt;
&lt;br /&gt;
Click on the''' Execute query button'''.&lt;br /&gt;
|| Type the following query and execute it. This query displays studentid and their names whose '''C G P A''' value is '''NULL'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Let us update the record so that it no longer displays NULL.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 8'''&lt;br /&gt;
&lt;br /&gt;
'''UPDATE Statement'''&lt;br /&gt;
|| '''UPDATE''' Statement is used to modify existing records in a table.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 9'''&lt;br /&gt;
&lt;br /&gt;
'''Syntax of UPDATE Statement'''.&lt;br /&gt;
&lt;br /&gt;
'''UPDATE table_name'''&lt;br /&gt;
&lt;br /&gt;
'''SET column1 = value1, column2 = value2, ...'''&lt;br /&gt;
&lt;br /&gt;
'''WHERE condition; '''&lt;br /&gt;
|| Here is the syntax of the UPDATE statement.'''UPDATE''' specifies the table to be modified.&lt;br /&gt;
&lt;br /&gt;
'''SET''' assigns new values to one or more columns.&lt;br /&gt;
&lt;br /&gt;
'''WHERE''' selects the records that need to be updated.&lt;br /&gt;
|-&lt;br /&gt;
|| Type: '''UPDATE students'''&lt;br /&gt;
&lt;br /&gt;
'''SET cgpa = 8.1'''&lt;br /&gt;
&lt;br /&gt;
'''WHERE studentid = 'S116';'''&lt;br /&gt;
&lt;br /&gt;
Click on the''' Execute query button'''.&lt;br /&gt;
|| Let us update the Null value.&lt;br /&gt;
&lt;br /&gt;
Type this query. &lt;br /&gt;
&lt;br /&gt;
Here the '''SET''' keyword sets the C G P A value to 8 point 1.&lt;br /&gt;
&lt;br /&gt;
Let us execute the query.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Cursor on Query returned successfully in 322 msec.'''&lt;br /&gt;
|| The output shows that the query is updated.&lt;br /&gt;
|-&lt;br /&gt;
|| Type: &lt;br /&gt;
&lt;br /&gt;
'''SELECT * FROM students '''&lt;br /&gt;
&lt;br /&gt;
'''WHERE studentid = ‘S116’;'''&lt;br /&gt;
|| Now let us type this query and execute it.&lt;br /&gt;
&lt;br /&gt;
We can see that a new record is added to the table.&lt;br /&gt;
|-&lt;br /&gt;
|| Show the table and point to M in the records.&lt;br /&gt;
|| Let us update the records of students with studentids S116 and S117&lt;br /&gt;
|-&lt;br /&gt;
|| Type the following:'''UPDATE students'''&lt;br /&gt;
&lt;br /&gt;
'''SET gender = 'Male''''&lt;br /&gt;
&lt;br /&gt;
'''WHERE studentid = 'S116''''&lt;br /&gt;
&lt;br /&gt;
'''OR studentid = 'S117';'''&lt;br /&gt;
&lt;br /&gt;
Click on the Execute Query button.&lt;br /&gt;
|| Type the following query.&lt;br /&gt;
&lt;br /&gt;
In this query we will set the gender to male.&lt;br /&gt;
&lt;br /&gt;
Let us execute the query.&lt;br /&gt;
&lt;br /&gt;
The table is now updated.&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;
&lt;br /&gt;
Point to the gender columns of the students.&lt;br /&gt;
|| Let us display the entire table.Type this query and execute it.&lt;br /&gt;
&lt;br /&gt;
We can see that in the gender column M is updated to Male for studentids '''S116 '''and''' S117'''.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 10'''&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learnt how to,&lt;br /&gt;
* Insert and Display Null values and &lt;br /&gt;
* UPDATE Statement&lt;br /&gt;
|| With this, we come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarise.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 11'''&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
&lt;br /&gt;
'''As an Assignment, '''&lt;br /&gt;
&lt;br /&gt;
Insert a student record with a NULL CGPA value.&lt;br /&gt;
&lt;br /&gt;
Update the NULL CGPA value for one student.&lt;br /&gt;
&lt;br /&gt;
Verify the updated record using a SELECT query.&lt;br /&gt;
|| We encourage you to do this assignment.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 12'''&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
&lt;br /&gt;
This '''Spoken''' '''Tutorial''' is brought to you by '''EduPyramids''' Educational Services Private Limited SINE IIT Bombay.&lt;br /&gt;
|| Thank you for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ketkinaina</name></author>	</entry>

	</feed>