- ✕Deze samenvatting is gegenereerd met behulp van AI op basis van meerdere onlinebronnen. Als u de oorspronkelijke brongegevens wilt weergeven, gebruikt u de "Meer informatie"-koppelingen.
You can create a simple program that uses SQL commands to create a table, insert data, and retrieve it. Below is an example in Python using the sqlite3 module, which works with SQLite databases.
import sqlite3# Connect to database (creates file if it doesn't exist)conn = sqlite3.connect("company.db")cursor = conn.cursor()# 1. Create table (DDL Command)cursor.execute("""CREATE TABLE IF NOT EXISTS employees (id INTEGER PRIMARY KEY,first_name TEXT NOT NULL,last_name TEXT NOT NULL,department TEXT,hire_date TEXT);""")# 2. Insert data (DML Command)cursor.execute("""INSERT INTO employees (first_name, last_name, department, hire_date)VALUES ('John', 'Doe', 'IT', '2024-06-01');""")cursor.execute("""INSERT INTO employees (first_name, last_name, department, hire_date)VALUES ('Jane', 'Smith', 'HR', '2024-07-15');""")# Commit changesconn.commit()# 3. Query data (DQL Command)cursor.execute("""SELECT first_name, last_name, departmentFROM employeesWHERE department = 'IT';""")rows = cursor.fetchall()for row in rows:print(row)# Close connectionconn.close()Gekopieerd.✕Kopiëren Professional Certificate - Earn A Certificate - Coursera
GesponsordLearn data science, Python, database, SQL, data visualization, machine learning algorithms. Offered by IBM. Prepare for a career as a data scientist
SQL Examples - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.
What Is an SQL Database? A Beginner's Guide
3 jun. 2025 · An SQL database is any database that uses SQL to query and manage the data it holds. It organizes information into tables, which are made up of rows …
Training SQL Fundamentals - Computrain IT-trainingen
GesponsordVolg de opleiding SQL Fundamentals bij Computrain. Direct toepasbaar in je werk. Blijf jezelf ontwikkelen met een IT-training van Computrain. Leer gemakkelijk vanuit huis.Introduction to SQL - Save 50% Today | DataCamp
GesponsordLearn MySQL by doing interactive coding exercises. Free registration. Start now. All you need to master MySQL for Data Science. Start our free course today.4,5/5 (749 reviews)
sql book voor een lage prijs - Bespaar op sql book
GesponsordProfiteer van aanbiedingen van sql book in boeken op Amazon. Miljoenen producten voor 23.59 uur besteld, morgen in huisWebsitebezoekers: Meer dan 100 K in de afgelopen maand
Verkrijg uitgebreide informatie over What's SQL Database Example