In this project, I created a SQL table called 'friends' to practice database operations. I inserted, updated, and deleted records, added an email column, and used SELECT to view results. The project demonstrates basic CRUD operations and good table design using a PRIMARY KEY for data integrity.
This project demonstrates how to create and interact with a basic SQL table named friends. The table includes key fields like ID, name, birthday, and email. I performed common SQL operations such as:
- Creating a table with constraints
- Inserting multiple records
- Updating specific values
- Deleting a record
- Viewing the final results using a SELECT statement
The goal of this project was to strengthen my understanding of SQL and CRUD operations (Create, Read, Update, Delete) in a hands-on way.
CREATE TABLEwith aPRIMARY KEYfor data integrityINSERT INTOto add data to the tableUPDATEto modify specific fieldsDELETE FROMto remove a rowSELECT *to view results- Realistic sample data with valid formatting
Final table after operations:
- Copy the code from
friends.sql. - Run it in any SQL environment that supports standard SQL (like SQLite, PostgreSQL, MySQL, or an online SQL editor).
- Observe how data is added, changed, and removed from the
friendstable.
Feel free to:
- Add more columns (e.g., phone number, address)
- Add more friends
- Create related tables (e.g., hobbies, locations)
- Add constraints like
NOT NULLorUNIQUE
If youβd like to contribute, feel free to fork this repo and build on the idea. Pull requests are welcome!
Reach out if you want to collaborate or have questions about the code.