Skip to Content
Go Realm v1 is released 🎉

✏️ CRUD Queries

  • How to write a CREATE query?

Example: Creating a Users table

CREATE TABLE Users ( id INT PRIMARY KEY, name VARCHAR(100), email VARCHAR(100) UNIQUE, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
  • How to write a READ (SELECT) query?

Example: Fetching all users

SELECT * FROM Users;

Example: Fetching specific columns with conditions

SELECT name, email FROM Users WHERE id = 1;
  • How to write an UPDATE query?

Example: Updating a user’s name

UPDATE Users SET name = 'John Doe' WHERE id = 1;
  • How to write a DELETE query?

Example: Deleting a user

DELETE FROM Users WHERE id = 1;