កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course

Slides:



Advertisements
Similar presentations
Copyright © by Royal Institute of Information Technology Introduction To Structured Query Language (SQL) 1.
Advertisements

Bases de Datos 1 Prof. Daniel Obando Fuentes. CREANDO UNA BASE DE DATOS CREATE DATABASE dbname;
Maintaining Referential Integrity Pertemuan 2 Matakuliah: T0413/Current Popular IT II Tahun: 2007.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
SQL Keys and Constraints Justin Maksim. Key Declaration Key constraint defined within the CREATE TABLE command Key can be declared using either the PRIMARY.
SQL DDL constraints Restrictions on the columns and tables 1SQL DDL Constraints.
Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Lecture 10: Data Definition Language.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
Chapter 6 SQL: Data Manipulation (Advanced Commands) Pearson Education © 2009.
SELECT e.NationalIDNumber, p.FirstName,p.LastName, City FROM HumanResources.Employee e INNER JOIN Person.Person p on p.BusinessEntityID = e.BusinessEntityID.
Advanced Database Management System
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
SQL Basics. What is SQL? SQL stands for Structured Query Language. SQL lets you access and manipulate databases.
Tables and Constraints Oracle PL/SQL. Datatypes The SQL Data Definition Language Commands (or DDL) enable us to create, modify and remove database data.
1 SQL - II Data Constraints –Applying data constraints Types of data constraints –I/O constraints The PRIMARY KEY constraints The FOREIGN KEY constraints.
Chapter 9 Constraints. Chapter Objectives  Explain the purpose of constraints in a table  Distinguish among PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK,
Oracle 11g: SQL Chapter 4 Constraints.
CREATE TABLE CREATE TABLE statement is used for creating relations Each column is described with three parts: column name, data type, and optional constraints.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
DBSQL 5-1 Copyright © Genetic Computer School 2009 Chapter 5 Structured Query Language.
SQL introduction 2013.
INCLUDING CONSTRAINTS lecture5. Outlines  What are Constraints ?  Constraint Guidelines  Defining Constraint  NOT NULL constraint  Unique constraint.
1 SQL-2 Tarek El-Shishtawy Professor Ass. Of Computer Engineering.
1 DBS201: More on SQL Lecture 3. 2 Agenda How to use SQL to update table definitions How to update data in a table How to join tables together.
Fox MIS Spring 2011 Database Week 6 ERD and SQL Exercise.
1 SQL Insert Update Delete Create table Alter table.
Understand Primary, Foreign, and Composite Keys Database Administration Fundamentals LESSON 4.2.
IS6146 Databases for Management Information Systems Lecture 3: SQL III – The DDL Rob Gleasure robgleasure.com.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Including Constraints. What Are Constraints? Constraints enforce rules at the table level. You can use constraints to do the following: – Enforce rules.
CREATE TABLE ARTIST ( ArtistID int NOT NULL IDENTITY (1,1), Namechar(25) NOT NULL, TEXT ERROR Nationality char (30) NULL, Birthdate numeric (4,0) NULL,
Lec-7. The IN Operator The IN operator allows you to specify multiple values in a WHERE clause. SQL IN Syntax SELECT column_name(s) FROM table_name WHERE.
MS SQL Create Table Cust USE jxc00 GO CREATE TABLE cust ( cust_id smallint IDENTITY(1,1) NOT NULL, cust_name char(10)
SQL - Training Rajesh Charles. Agenda (Complete Course) Introduction Testing Methodologies Manual Testing Practical Workshop Automation Testing Practical.
Getting started with Accurately Storing Data
Fundamentals of DBMS Notes-1.
Rob Gleasure robgleasure.com
From: SQL From:
Rob Gleasure robgleasure.com
SQL: Schema Definition and Constraints Chapter 6 week 6
Insert, Update and the rest…
COMP 430 Intro. to Database Systems
Data Definition and Data Types
Structured Query Language (Data definition Language)
Lecturer: Mukhtar Mohamed Ali “Hakaale”
Index Structure.
لغة قواعد البيانات STRUCTURED QUERY LANGUAGE SQL))
SQL data definition using Oracle
For student, require values for name and address.
DATABASE SQL= Structure Query Language مبادئ قواعد بيانات
SQL Code for Byrnetube video
SQL DATA CONSTRAINTS.
Oracle Data Definition Language (DDL)
Rob Gleasure robgleasure.com
Lesson Plan Instructional Objective Learning Objective
Data Definition Language
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
Instructor: Samia arshad
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
Including Constraints
SQL NOT NULL Constraint
SQL (Structured Query Language)
SQL AUTO INCREMENT Field
Presentation transcript:

កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course

មេរៀនទី ២៖ SQL CONSTRAINTS & NOT NULL & UNIQUE ២.១ ២.២ ២.៣ SQL Constraints  SQL NOT NULL  SQL UNIQUE

២.១ SQL Constraints  SQL Constraints ត្រូវបានប្រើដើម្បីកំណត់ច្បាប់ជាក់លាក់សម្រាប់ទិន្នន័យនៅក្នុង Table។ បើសិនការ បញ្ចូលទិន្នន័យផ្ទុយពីវា វានឹងលុបទិន្នន័យនោះចោល។ SQL Constraints មាន NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK, DEFAULT។

២.២ SQL NOT NULL NOT NULL ប្រើដើម្បីកុំអោយ column ទទួលយកតំលៃទទេពីការបញ្ចូល។ Syntax CREATE TABLE PersonsNotNull( P_Id int NOT NULL, LastName varchar(255) NOT NULL, FirstName varchar(255), Address varchar(255), City varchar(255) );

២.៣ SQL UNIQUE UNIQUE កំណត់អោយ​​ column ដែលមានពាក្យនេះកុំអោយមានទិន្នន័យជាន់គ្នានៅក្នុង Table។ UNIQUE ដូច PRIMARY KEY​។ ប៉ុន្តែ Table អាច UNIQUE ជាច្រើន ចំនែកឯ PRIMARY KEY​ មានតែមួយគត់។ Syntax CREATE TABLE Persons( P_Id int NOT NULL UNIQUE, LastName varchar(255) NOT NULL, FirstName varchar(255), Address varchar(255), City varchar(255) );

២.៣ SQL UNIQUE បញ្ចូល​ UNIQUE​ ក្នុង Table ALTER TABLE Persons ADD UNIQUE (P_Id); លុប UNIQUE ALTER TABLE Persons DROP CONSTRAINT uc_PersonID;

សមាជិក កែន វណ្ណថា ហ៊ី​ ឡេងសែ ឡាំ អរុណ Vantha_ken@yahoo.com hylengse.it@gmail.com arunlam2891@gmail.com