The following constraints are commonly used in SQL: AAA"Adding rows to a table" NOT NULL - Ensures that a column cannot have a NULL value UNIQUE - Ensures that all values in a column are different PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table FOREIGN KEY - Uniquely identifies a row/record in another table • CHECK - Ensures that all values in a column satisfies a specific condition DEFAULT - Sets a default value for a column when no value is specified INDEX - Used to create and retrieve data from the database Please follow the instruction and submit screen shuts to the Blackboard under"LAB#3 CREATE . TABLE" 1- Create Table named " Employees". Using command" Create table". The table should contain FOUR columns, 4 rows (use INSERT INT0 to create the rows) and at least add two constraints. 2- Choose one primary key. 3- Choose your unique attribute. 4- Use SELECT command. 5- Use UPDATE command. 6- Use DELETE command. 7- Use INSERT INTO command (use INSERT INTO to create the four rows) very quickly Some of The Most Important SQL Example: CREATE TABLE Employees ( EmployeeID int NOT NULL PRIMARY KEY, EmployeeName varchar(255) NOT NULL, EmployeeType varchar (255), EmployeeRef int Commands SELECT - extracts data from a database UPDATE - updates data in a database DELETE - deletes data from a database INSERT INTO - inserts new data into a database CREATE DATABASE - creates a new database ALTER DATABASE - modifies a database CREATE TABLE - creates a new table ALTER TABLE - modifies a table • DROP TABLE - deletes a table CREATE INDEX - creates an index (search key) DROP INDEX - deletes an index INSERT INTO Employees (EmploveeID, EmployeeName, EmployeeType, EmployeeRef) VALUES (valuel, value2, value3, value4);
The following constraints are commonly used in SQL: AAA"Adding rows to a table" NOT NULL - Ensures that a column cannot have a NULL value UNIQUE - Ensures that all values in a column are different PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table FOREIGN KEY - Uniquely identifies a row/record in another table • CHECK - Ensures that all values in a column satisfies a specific condition DEFAULT - Sets a default value for a column when no value is specified INDEX - Used to create and retrieve data from the database Please follow the instruction and submit screen shuts to the Blackboard under"LAB#3 CREATE . TABLE" 1- Create Table named " Employees". Using command" Create table". The table should contain FOUR columns, 4 rows (use INSERT INT0 to create the rows) and at least add two constraints. 2- Choose one primary key. 3- Choose your unique attribute. 4- Use SELECT command. 5- Use UPDATE command. 6- Use DELETE command. 7- Use INSERT INTO command (use INSERT INTO to create the four rows) very quickly Some of The Most Important SQL Example: CREATE TABLE Employees ( EmployeeID int NOT NULL PRIMARY KEY, EmployeeName varchar(255) NOT NULL, EmployeeType varchar (255), EmployeeRef int Commands SELECT - extracts data from a database UPDATE - updates data in a database DELETE - deletes data from a database INSERT INTO - inserts new data into a database CREATE DATABASE - creates a new database ALTER DATABASE - modifies a database CREATE TABLE - creates a new table ALTER TABLE - modifies a table • DROP TABLE - deletes a table CREATE INDEX - creates an index (search key) DROP INDEX - deletes an index INSERT INTO Employees (EmploveeID, EmployeeName, EmployeeType, EmployeeRef) VALUES (valuel, value2, value3, value4);
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Answer Plz
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education