9
sql
-- View all clients
SELECT * FROM clients;
-- Add a new column for client phone numbers
ALTER TABLE clients
ADD COLUMN phone TEXT;
-- View all clients
SELECT * FROM clients;
-- Update phone for one of the clients
UPDATE clients
SET phone = '+1-555-123-4567'
WHERE name = 'Jason Green';
-- View all clients
SELECT * FROM clients;
-- Rename the column from phone to contact_number (SQLite only)
ALTER TABLE clients
RENAME COLUMN phone TO contact_number;
-- View all clients
SELECT * FROM clients;
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.