localnews.ie

Here’s a straightforward `INSERT` statement you can run against your `users` table:

```sql -- If `id` is an AUTO_INCREMENT / SERIAL column and `created_at` / `updated_at` -- default to the current timestamp, you only need to supply the fields you -- want to set explicitly:

INSERT INTO users (name, email, password) VALUES ('John Doe', 'john@example.com', 'password123'); ```

If your schema requires you to provide values for `created_at` and `updated_at` (or you want to override the defaults), you can include them explicitly:

```sql INSERT INTO users (name, email, password, created_at, updated_at) VALUES ('John Doe', 'john@example.com', 'password123', NOW(), NOW()); ```

> **Tip:** In a real application you should hash the password before storing it (e.g., `bcrypt`, `argon2`, etc.) rather than saving the plain text `"password123"`.

Summary written by localnews.ie from the original source coverage. Click through for the full report.

Something thin or off here?Flag this story for a closer look.