Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion hw_7.sql
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,14 @@ ADD CONSTRAINT fk_employees_job

-- 3


--UPD

CREATE DOMAIN schema1.phone_dom AS varchar(20)
CHECK (VALUE ~ '^8\\([0-9]{3}\\)[0-9]{3}-[0-9]{4}$');
CHECK (VALUE ~ '^8\([0-9]{3}\)[0-9]{3}-[0-9]{4}$');

--UPD


ALTER TABLE schema1.employees
ALTER COLUMN phone_number TYPE schema1.phone_dom
Expand Down