SQL বাক্যবন্ধন
- Previous Page SQL সংক্ষিপ্ত বর্ণনা
- Next Page SQL select
ডাটাবেস টেবিল
একটি ডাটাবেস সাধারণত একটি বা একাধিক টেবিল নিয়ে গঠিত। প্রত্যেক টেবিলকে একটি নাম দ্বারা পরিচিত করা হয় (যেমন "ক্লাইমেন্ট" বা "অর্ডার"), টেবিলটিতে ডাটা নিবন্ধিত রেকর্ড (হার) রয়েছে。
এই উদাহরণটি "Persons" নামক একটি টেবিলকে প্রদর্শন করে:
Id | LastName | FirstName | ঠিকানা | শহর |
---|---|---|---|---|
1 | Adams | জন | অক্সফোর্ড স্ট্রিট | লন্ডন |
2 | Bush | জর্জ | ফিগথ এভেনিউ | নিউ ইয়র্ক |
3 | Carter | থমাস | চাংগান স্ট্রিট | বেইজিং |
উপরোক্ত টেবিলটিতে তিনটি রেকর্ড (প্রত্যেকটি একজন ব্যক্তিকে প্রতিনিধিত্ব করে) এবং পাঁচটি কলাম (Id, পরিবারনাম, নাম, ঠিকানা এবং শহর) রয়েছে。
SQL বিন্যাস
ডাটাবেসের উপর আপনি করতে হবে অধিকাংশ কাজ SQL বিন্যাসের মাধ্যমে সম্পন্ন হবে。
নিচের বিন্যাসটি একটি টেবিল থেকে LastName কলামের ডাটা নির্বাচন করে:
SELECT LastName FROM Persons
ফলাফল এইরকম হবে:
LastName |
---|
Adams |
Bush |
Carter |
In this tutorial, we will explain various types of SQL statements to you.
Important Matters
Be sure to remember that,SQL is case-insensitive!
Semicolon after SQL statements?
Some database systems require the use of a semicolon at the end of each SQL command. We do not use semicolons in our tutorial.
The semicolon is the standard method of separating each SQL statement in a database system, allowing more than one statement to be executed in the same request to the server.
If you are using MS Access and SQL Server 2000, you do not need to use a semicolon after each SQL statement, but some database software requires that a semicolon must be used.
SQL DML and DDL
SQL can be divided into two parts: Data Manipulation Language (DML) and Data Definition Language (DDL).
SQL (Structured Query Language) is the syntax used to execute queries. However, the SQL language also includes syntax for updating, inserting, and deleting records.
Query and update instructions make up the DML (Data Manipulation Language) part of SQL:
- SELECT - Retrieve Data from Database Table
- UPDATE - Update Data in Database Table
- DELETE - Delete Data from Database Table
- INSERT INTO - Insert Data into Database Table
The DDL (Data Definition Language) part of SQL enables us to create or delete tables. We can also define indexes (keys), specify links between tables, and impose constraints between tables.
The most important DDL statement in SQL:
- CREATE DATABASE - Create New Database
- ALTER DATABASE - Modify Database
- CREATE TABLE - Create New Table
- ALTER TABLE - Modify (Change) Database Table
- DROP TABLE - Delete Table
- CREATE INDEX - Create Index (Search Key)
- DROP INDEX - Delete Index
- Previous Page SQL সংক্ষিপ্ত বর্ণনা
- Next Page SQL select