<?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=RDBMS-PostgreSQL%2FC2%2FForeign-key-Constraint%2FEnglish-timed</id>
		<title>RDBMS-PostgreSQL/C2/Foreign-key-Constraint/English-timed - 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=RDBMS-PostgreSQL%2FC2%2FForeign-key-Constraint%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=RDBMS-PostgreSQL/C2/Foreign-key-Constraint/English-timed&amp;action=history"/>
		<updated>2026-04-29T01:33:02Z</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=RDBMS-PostgreSQL/C2/Foreign-key-Constraint/English-timed&amp;diff=45704&amp;oldid=prev</id>
		<title>Sandhya.np14 at 17:20, 5 February 2019</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=RDBMS-PostgreSQL/C2/Foreign-key-Constraint/English-timed&amp;diff=45704&amp;oldid=prev"/>
				<updated>2019-02-05T17:20:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://script.spoken-tutorial.org/index.php?title=RDBMS-PostgreSQL/C2/Foreign-key-Constraint/English-timed&amp;amp;diff=45704&amp;amp;oldid=45661&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Sandhya.np14</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=RDBMS-PostgreSQL/C2/Foreign-key-Constraint/English-timed&amp;diff=45661&amp;oldid=prev</id>
		<title>PoojaMoolya: Created page with &quot;{| border=1 |  '''Time'''  |  '''Narration'''   |-  |00:01 | Welcome to the''' Spoken Tutorial''' on''' Foreign key constraint.'''   |-  | 00:06 | In this tutorial we will lea...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=RDBMS-PostgreSQL/C2/Foreign-key-Constraint/English-timed&amp;diff=45661&amp;oldid=prev"/>
				<updated>2019-01-30T11:05:49Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| border=1 |  &amp;#039;&amp;#039;&amp;#039;Time&amp;#039;&amp;#039;&amp;#039;  |  &amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039;   |-  |00:01 | Welcome to the&amp;#039;&amp;#039;&amp;#039; Spoken Tutorial&amp;#039;&amp;#039;&amp;#039; on&amp;#039;&amp;#039;&amp;#039; Foreign key constraint.&amp;#039;&amp;#039;&amp;#039;   |-  | 00:06 | In this tutorial we will lea...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=1&lt;br /&gt;
|  '''Time''' &lt;br /&gt;
|  '''Narration''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|00:01&lt;br /&gt;
| Welcome to the''' Spoken Tutorial''' on''' Foreign key constraint.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:06&lt;br /&gt;
| In this tutorial we will learn about &lt;br /&gt;
&lt;br /&gt;
'''Foreign key constraint''' &lt;br /&gt;
&lt;br /&gt;
'''Alter table''' command &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:13&lt;br /&gt;
| How to add a '''foreign key''' and &lt;br /&gt;
&lt;br /&gt;
Check '''constraint''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:17&lt;br /&gt;
| To record this tutorial, I am using  '''Ubuntu Linux 14.04''' operating system &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:24&lt;br /&gt;
|  '''PostgreSQL 9.3.x''' and&lt;br /&gt;
&lt;br /&gt;
'''pgAdmin 1.18''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:32&lt;br /&gt;
| To follow this tutorial, you should have  Basic understanding of '''database''' and '''tables''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:39&lt;br /&gt;
| For more details, refer to the '''RDBMS – PostgreSQL''' series on this website &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:46&lt;br /&gt;
| This is the '''students''' table which we created. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:49&lt;br /&gt;
| I want to add details such as '''department name '''and '''department head '''for each student as shown here. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:58&lt;br /&gt;
| As we can see, the '''department name '''and '''department head '''data is repeated. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:04&lt;br /&gt;
| So we will separate these data into different tables and then relate them with '''foreign key.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:11&lt;br /&gt;
| It is important to separate student and department data into separate tables since one can exist without another. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:20&lt;br /&gt;
| What is a '''foreign key'''? &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:22&lt;br /&gt;
| A '''foreign key''' represents a link between columns in two different '''tables'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:28&lt;br /&gt;
| A '''foreign key''' in a '''table '''points to a '''primary key''' in another '''table'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:33&lt;br /&gt;
| A '''table '''can contain more than one '''foreign key''' '''constraint'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:38&lt;br /&gt;
| The '''table '''that has the '''foreign key''' is called as the '''referencing''' '''table''' or '''child table'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:45&lt;br /&gt;
| The '''table''' to which the''' foreign key''' references is called the '''referenced''' '''table''' or '''parent table'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:52&lt;br /&gt;
| Let’s see an example of '''foreign key''' link between '''students''' and '''department tables'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:59&lt;br /&gt;
| Here the '''department table''' is the '''parent table''' in which the '''departmentid''' is the '''primary key.''' &lt;br /&gt;
&lt;br /&gt;
'''Students table''' is the '''child table.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:09&lt;br /&gt;
| '''Deptid''' column is the '''foreign key''' which references the '''departmentid''' of the '''department table'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:17&lt;br /&gt;
| Note that the '''foreign key''' column and the '''referenced key''' column must have similar data types. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:24&lt;br /&gt;
| Open the '''SQL editor window''' in the '''pgAdmin'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:29&lt;br /&gt;
| First let us create the '''parent table department''' i.e the '''referenced table. ''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:35&lt;br /&gt;
| Type the code. &lt;br /&gt;
&lt;br /&gt;
'''Departmenttid''' is the '''primary key '''which uniquely identifies each department. &lt;br /&gt;
&lt;br /&gt;
The '''parent table department '''is ready to execute. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:49&lt;br /&gt;
| Let's insert some data to the '''department table.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|02:53&lt;br /&gt;
| Clear the editor window. &lt;br /&gt;
&lt;br /&gt;
Type the code and execute the query. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|02:59&lt;br /&gt;
| Now, let us retrieve the records. &lt;br /&gt;
&lt;br /&gt;
Clear the window. Type '''select asterisk from department.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:10&lt;br /&gt;
| This is the '''parent table'''. Each student must belong to one of the departments shown here. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:19&lt;br /&gt;
| Switch back to the '''pgAdmin''' main screen. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:22&lt;br /&gt;
| We have already created the '''students table '''with the ''''Create''' '''table'''' command. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:27&lt;br /&gt;
| Next we need to add a new column '''deptid''' to the existing '''students table.''' &lt;br /&gt;
&lt;br /&gt;
This will assign each student to a particular department. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:39&lt;br /&gt;
| To do so, we need to use the '''Alter table''' command. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:43&lt;br /&gt;
| '''Alter table '''command is used to change the structure of an existing '''table'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:49&lt;br /&gt;
| This command is used to add, delete or modify columns in an existing '''table'''. &lt;br /&gt;
&lt;br /&gt;
It is used to add or drop '''constraints'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:00&lt;br /&gt;
| Using this command, even the '''data type''' of the columns can be changed. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|04:06&lt;br /&gt;
| The syntax to '''Alter table''' is '''ALTER TABLE table-name ADD new-column-name data type;''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:16&lt;br /&gt;
| The syntax to add multiple columns at the same time, is shown here. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:22&lt;br /&gt;
| Let’s switch back to the '''pgadmin SQL editor''' window for the demonstration. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:28&lt;br /&gt;
| Let us add a new column by the name '''deptid''' to the '''students table'''. &lt;br /&gt;
&lt;br /&gt;
Type the code and execute. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:37&lt;br /&gt;
| Let us check this. &lt;br /&gt;
&lt;br /&gt;
Go to the '''pgAdmin''' main screen. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:42&lt;br /&gt;
| Right-click on '''students''' column node and select '''Refresh''' to update the changes. &lt;br /&gt;
&lt;br /&gt;
We can see the '''deptid''' column. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:52&lt;br /&gt;
| Now let us add the '''foreign key constraint'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:56&lt;br /&gt;
| Type the code as shown. Here, '''deptid''' column of '''students table''' is a '''foreign key'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:05&lt;br /&gt;
| This references the '''departmentid''' column of the '''department table.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:11&lt;br /&gt;
| The '''foreign key constraint '''maintains '''referential''' '''integrity''' between the '''child '''and '''parent tables.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:18&lt;br /&gt;
| This means that the values in a column must match the values in some row of another '''table'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:25&lt;br /&gt;
| Let us now execute the query. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:28&lt;br /&gt;
| Go to the '''pgAdmin''' main screen. &lt;br /&gt;
&lt;br /&gt;
Right click on the '''students table '''node and click '''refresh'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:36&lt;br /&gt;
| In the '''SQL Pane''', we can see a '''constraint''' name for each '''constraint '''automatically created. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:43&lt;br /&gt;
| We can also specify a '''constraint''' name while creating or '''altering '''a '''table'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:49&lt;br /&gt;
| Use this '''constraint''' name to drop the '''constraint''' if it is not required later. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:55&lt;br /&gt;
| Now right-click on '''students''' node, and then on '''View data''' and then on '''View''' '''All rows.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:03&lt;br /&gt;
| '''Deptid''' column is empty. Let us add department details to each student as shown. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:12&lt;br /&gt;
| Let me type ''''MEC'''' for '''Mechanical department '''for the student '''Pooja''' and press '''Enter'''. &lt;br /&gt;
 &lt;br /&gt;
|- &lt;br /&gt;
| 06:20&lt;br /&gt;
| We can see a error message of '''“foreign key violation”.''' &lt;br /&gt;
&lt;br /&gt;
It says ''''deptid='mec' '''is not present in '''table department.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:33&lt;br /&gt;
| '''Foreign key constraint''' prevents invalid data from being inserted into the '''foreign key '''columns. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:40&lt;br /&gt;
| It has to be one of the values of the '''referencing '''column. I.e '''departmentid''' column value from the '''department table.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:49&lt;br /&gt;
| Click on the '''OK''' button. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:52&lt;br /&gt;
| Now, I'll enter ''''MT'''' as '''department id''' and save the record. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|06:58&lt;br /&gt;
| Enter a valid '''departmentid''' for other students also as shown. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|07:04&lt;br /&gt;
| Let me open '''department''' and '''students table '''in 2 different windows. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 07:09&lt;br /&gt;
| These '''tables '''have '''One-to-Many relationship'''. &lt;br /&gt;
&lt;br /&gt;
A row from one '''table '''can have multiple matching rows in another '''table'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 07:19&lt;br /&gt;
| This '''relationship '''is created using '''Primary key and Foreign key constraints.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 07:25&lt;br /&gt;
| Let us see the advantages of using Foreign key. &lt;br /&gt;
&lt;br /&gt;
It will enforce the constraint. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 07:31&lt;br /&gt;
| For example, it will enforce every student should have a department. &lt;br /&gt;
 &lt;br /&gt;
It controls redundancy and avoid inconsistency. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 07:42&lt;br /&gt;
| For example, it controls the entry of different names of head for the same department &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 07:50&lt;br /&gt;
| Next we will learn more about '''Alter table''' command. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 07:54&lt;br /&gt;
| We can use '''ALTER TABLE '''– '''Alter '''column command to change the '''data type''' or length of a column in a '''table'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 08:02&lt;br /&gt;
| The syntax is '''ALTER TABLE table-name ALTER column-name TYPE data type;''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 08:11&lt;br /&gt;
| Say, I want to change the '''cgpa''' column's length from 2,1 to 3,1. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 08:18&lt;br /&gt;
| Type the code as shown and then execute. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 08:22&lt;br /&gt;
| Now the '''cgpa''' column length is altered in the '''students table.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 08:27&lt;br /&gt;
| Let's check. Refresh the '''students table '''and see the changes. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 08:34&lt;br /&gt;
| Next we will learn about '''constraints'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|08:37&lt;br /&gt;
| '''Constraints''' are the conditions or rules enforced on '''columns''' or '''tables'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 08:43&lt;br /&gt;
| These are used to prevent invalid data entry into the '''database.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 08:48&lt;br /&gt;
| Column level '''constraints '''are applied to only one column. &lt;br /&gt;
&lt;br /&gt;
'''Table '''level constraints are applied to the whole '''table.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 08:57&lt;br /&gt;
| Some of the commonly used constraints in '''PostgreSQL''' are: &lt;br /&gt;
&lt;br /&gt;
'''NOT NULL constraint''' &lt;br /&gt;
&lt;br /&gt;
'''UNIQUE constraint''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 09:04&lt;br /&gt;
| '''Primary key constraint''' &lt;br /&gt;
&lt;br /&gt;
'''Foreign key constraint''' &lt;br /&gt;
&lt;br /&gt;
and '''Check constraint''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 09:11&lt;br /&gt;
| Next we will see how to add a '''check constraint '''to the '''cgpa''' column. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 09:16&lt;br /&gt;
| Type the code as shown. &lt;br /&gt;
&lt;br /&gt;
'''Alter table students add constraint cgpa underscore chk check cgpa greater than or equal to zero and cgpa less than or equal to 10''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 09:33&lt;br /&gt;
| Here I have given the '''constraint '''name as '''cgpa underscore chk.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 09:39&lt;br /&gt;
| It specifies a condition that the '''cgpa''' value should be between 0 and 10. &lt;br /&gt;
&lt;br /&gt;
This restricts the user from entering invalid data. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 09:51&lt;br /&gt;
| Let’s now execute the query. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 09:54&lt;br /&gt;
| Now let us insert one more record to the students table with cgpa as 22 and see what happens. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:02&lt;br /&gt;
| Right-click on '''students''' node, select '''View Data''' and then '''Views All Rows.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:08&lt;br /&gt;
| I'll enter the data as shown. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:11&lt;br /&gt;
| In the '''cgpa''' column, I'll enter 22 and press '''Enter.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:17&lt;br /&gt;
| We can see an error message of '''check constraint violation.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:22&lt;br /&gt;
| This indicates that we have entered a invalid data. &lt;br /&gt;
&lt;br /&gt;
Click on the “'''OK'''” button. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:29&lt;br /&gt;
| Now enter 10 as '''cgpa''', '''CS''' as '''deptid''' and save the record. &lt;br /&gt;
&lt;br /&gt;
The record is successfully saved. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:41&lt;br /&gt;
| Let us see the syntax for how to use '''constraints''' in the '''create table''' command. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:47&lt;br /&gt;
| Switch to the '''pgAdmin''' main screen. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:50&lt;br /&gt;
| Click on the '''students''' node and then refresh. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 10:54&lt;br /&gt;
| Now come to the '''sql''' pane. &lt;br /&gt;
&lt;br /&gt;
Here we can see the '''create table''' syntax for the '''students table''' along with the constraints. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|11:04&lt;br /&gt;
| We can add '''constraints '''while creating a '''table '''if the '''table '''structure is properly designed initially. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 11:11&lt;br /&gt;
| With this we come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
Let us summarize. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 11:17&lt;br /&gt;
| In this tutorial, we have learnt about &lt;br /&gt;
 &lt;br /&gt;
'''Foreign key constraint''' &lt;br /&gt;
&lt;br /&gt;
'''Alter table '''command &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 11:23&lt;br /&gt;
| How to add a '''foreign key '''and '''Check constraints''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|11:28&lt;br /&gt;
| As an Assignment, Alter the '''students''' table to add a '''NOT NULL constraint''' to the column '''city''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 11:35&lt;br /&gt;
|  Insert a record and leave the '''city''' column empty &lt;br /&gt;
&lt;br /&gt;
Save the record. Note the error and resolve it. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 11:44&lt;br /&gt;
| The video at the following link summarises the Spoken Tutorial project. &lt;br /&gt;
&lt;br /&gt;
Please download and watch it. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 11:52&lt;br /&gt;
| The''' Spoken Tutorial Project''' Team &lt;br /&gt;
&lt;br /&gt;
conducts workshops gives certificates &lt;br /&gt;
&lt;br /&gt;
For more details, please write to us. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 12:00&lt;br /&gt;
| Please post your timed queries in this forum. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 12:04&lt;br /&gt;
| Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. &lt;br /&gt;
&lt;br /&gt;
For More information on this mission is available at this link. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 12:15&lt;br /&gt;
| This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. &lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>PoojaMoolya</name></author>	</entry>

	</feed>