Skip to main content
Practice

8

sql

-- View all clients
SELECT * FROM clients;

-- Insert a client without a status (DEFAULT will apply: 'active')
INSERT INTO clients (id, email, name)
VALUES (6, 'newclient@example.com', 'New Client');

-- View all clients
SELECT * FROM clients;

-- Attempt to insert a client with a duplicate email (will fail due to UNIQUE constraint)
INSERT INTO clients (id, email, name)
VALUES (7, 'alex@example.com', 'Duplicate Entry');

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.