From the course: PostgreSQL Essential Training
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Solution: Add data constraints - PostgreSQL Tutorial
From the course: PostgreSQL Essential Training
Solution: Add data constraints
(upbeat music) - [Adam] So, were you able to add the requested elements to the employees table? Let's go through the solution step by step. Our first goal was to add indexes on the employees table in the last name column. So I'm going to go into the KinetEco database and find the human resources schema and expand that open, and we'll go down and find our tables and find the employees table. In order to add an index to it, I will right-click on it, point to create, and choose index. Going to give this index a name. Let's call it employees because we're putting an index on the employees table. _last_name_idx. That way it's recognizable as an index on the last name column in the employees table. We'll go over here to the definition tab. Going to leave the access method as the btree. I'm not going to change any of these other options here. But we will come down and click add to add in a new column, and I'll select the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.