SQL Phone Number Format
This video demonstrates how to create a SQL phone number format constraint using a phone number CHECK Constraint.
Learn SQL FREE ✍with a "Practice Database"!
• Learn SQL Fast 🚀
Data Science Career Training:
https://www.jaffainc.com/Entrepreneur...
Search "Top Job Listings"!
https://www.jaffainc.com/research-car...
▶️ QUERY EXAMPLES:
► CREATE A PHONE NUMBER CHECK CONSTRINT
CREATE TABLE Customers
(
CustomerID INTEGER Primary Key NOT NULL,
FirstName CHAR(50) NOT NULL,
LastName CHAR(50) NOT NULL,
PhoneNumber CHAR(20) CHECK (PhoneNumber LIKE '[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]'),
CellNumber CHAR(20),
Address CHAR(50),
State CHAR(02),
City CHAR(30),
ZipCode INTEGER
);
► CREATE A PHONE NUMBER CHECK CONSTRINT ON THE EXISTING CUSTOMERS TABLE:
ALTER TABLE Customers
ADD CONSTRAINT ValidPhoneNumber
CHECK (CellNumber LIKE '[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]');
► DELETE THE VALIDPHONENUMBER CONSTRAINT:
ALTER TABLE Customers
DROP CONSTRAINT ValidPhoneNumber;
► VIEW CONSTRAINTS ON THE CUSTOMERS TABLE:
EXEC sp_helpconstraint Customers
🚀 COOL SQL TIPS AND TRICKS!
VIEW All the Tables & Columns in the Database:
• Show All Tables in Database | Learn S...
ADD Conditional Logic to Queries:
• SQL Case Statement | Learn SQL Fast 🚀
FIX Common SQL Errors:
• SQL Server Errors | Fixes and More ⭐
COPY Data from One Table to Another:
• How to Copy Data from One Table to An...
COMBINE Multiple Strings:
• Handy SQL Tips & Techniques! 🚀
CREATE an SQL Phone Number Format:
• SQL Phone Number Format | Learn SQL F...
FORMAT Dates in an SQL Query:
• Format Date in SQL Query | Learn SQL ...
ALTER Tables in SQL:
• Alter Tables in SQL | Learn SQL Fast 🚀
ADD Table Constraints to a Table:
• Add Constraints | Learn SQL Fast 🚀
Query Multiple Tables Simultaneously:
• INNER Join SQL | Learn SQL Fast 🚀
Get Started Using SQL Server:
• SQL Server | Get Started!
BOOST YOUR CAREER GROWTH!
🔹 Train for a Career in Data:
https://www.jaffainc.com/Entrepreneur...
🔹 Earn "SQL 🏅 Certifications & CEUs" (Continuing Education Units)
https://www.jaffainc.com/SQLCertifica...
#database #data #sql #sqlqueries #sqlforbeginners #sqltutorial #sqlcertificate #learnsql #sqltraining #sqlserver #relational #sqltips #sqlsyntax #sqlservertutorial #learnprogramming #datascience #databaseskills #dataanalysis #databasecertification #sqlcourse #practice #sqlpractice #sqlservertutorial #sqlservermanagementstudio #sqlskills
On this page of the site you can watch the video online SQL Phone Number Format with a duration of hours minute second in good quality, which was uploaded by the user SQL Learning Resources: Dr. Cecelia Allison 27 May 2023, share the link with friends and acquaintances, this video has already been watched 3,613 times on youtube and it was liked by 21 viewers. Enjoy your viewing!