> For the complete documentation index, see [llms.txt](https://linux-yonetimi.veriteknik.net.tr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://linux-yonetimi.veriteknik.net.tr/veritabani/mysql/sql-tablosuna-veri-eklemek.md).

# SQL Tablosuna Veri Eklemek

Bundan önceki bölümde tablomuzu oluşturmuştuk.

```
mysql> SHOW TABLES;
+-------------------+
| Tables_in_company |
+-------------------+
| member            |
+-------------------+
1 row in set (0.00 sec)
```

Şimdi bu tabloya `INSERT INTO` komutu ile veri ekleyelim.

**Tek Satır Ekleme:**

`AUTO_INCREMENT` ve `DEFAULT` değerleri olan sütunları (bizim örneğimizde `id`, `created_at`, `updated_at`) belirtmemize gerek yoktur, veritabanı bunları otomatik olarak halleder. Sadece değer girmek istediğimiz sütunları belirtmemiz yeterlidir:

```sql
INSERT INTO member (first_name, last_name, email, birthday) 
VALUES ('Yaşar', 'Celep', 'celep@veriteknik.com', '1996-12-23'); 
```

Başarılı olursa şöyle bir çıktı alınır:

```
Query OK, 1 row affected (0.02 sec)
```

**Birden Fazla Satır Ekleme:**

Tek bir `INSERT INTO` komutu ile birden fazla satır eklemek için `VALUES` kısmından sonra değer gruplarını virgülle ayırarak listeleyebilirsiniz:

```sql
INSERT INTO member (first_name, last_name, email, birthday) VALUES 
('Ahmet', 'Yılmaz', 'ahmet@example.com', '1990-05-15'),
('Ayşe', 'Kaya', 'ayse.kaya@example.net', NULL), -- Doğum tarihi boş olabilir
('Mehmet', 'Demir', 'mehmet@example.org', '1985-01-30');
```

```
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0
```

**Veriyi Kontrol Etme (`SELECT`):**

Eklenen verileri görmek için `SELECT * FROM <tablo_adı>;` komutunu kullanabiliriz. `*` sembolü "tüm sütunları" getir anlamına gelir.

```sql
SELECT * FROM member;
```

Örnek Çıktı:

```
+----+------------+-----------+----------------------+------------+---------------------+---------------------+
| id | first_name | last_name | email                | birthday   | created_at          | updated_at          |
+----+------------+-----------+----------------------+------------+---------------------+---------------------+
|  1 | Yaşar      | Celep     | celep@veriteknik.com | 1996-12-23 | 2025-03-28 06:18:00 | 2025-03-28 06:18:00 |
|  2 | Ahmet      | Yılmaz    | ahmet@example.com    | 1990-05-15 | 2025-03-28 06:18:30 | 2025-03-28 06:18:30 |
|  3 | Ayşe       | Kaya      | ayse.kaya@example.net| NULL       | 2025-03-28 06:18:30 | 2025-03-28 06:18:30 |
|  4 | Mehmet     | Demir     | mehmet@example.org   | 1985-01-30 | 2025-03-28 06:18:30 | 2025-03-28 06:18:30 |
+----+------------+-----------+----------------------+------------+---------------------+---------------------+
4 rows in set (0.00 sec)
```

Gördüğünüz gibi `id` sütunu otomatik olarak arttı ve `created_at`/`updated_at` sütunları otomatik olarak o anki zaman damgasıyla dolduruldu. `birthday` sütununa `NULL` değer girilebildi.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://linux-yonetimi.veriteknik.net.tr/veritabani/mysql/sql-tablosuna-veri-eklemek.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
