SQL Instrukcja Corrector
CREATE TABLE Provider (ProviderID CHAR(6) not null, FirstName VARCHAR(24) not null,
LastName VARCHAR(64) not null, PRIMARY KEY (ProviderID) );
INSERT INTO Provider (ProviderID, LastName, FirstName)
VALUES ('123456', 'Spock', 'Ben');
SELECT*FROM Provider;
ALTER TABLE Provider ADD COLUMN HireDate date;
UPDATE Provider SET FirstName = 'Ben' WHERE ProviderID = '123456';
INSERT INTO Provider (ProviderID, LastName, FirstName, HireDate)
VALUES ('123457', 'Schweitzer', 'Albert', '1990-05-09');
INSERT INTO Provider (ProviderID, LastName, FirstName, HireDate)
VALUES ('123458', 'Shepherd', 'Derek', '2005-03-27');
INSERT INTO Provider (ProviderID, LastName, FirstName, HireDate)
VALUES ('123459', 'Sloan', 'Mark', '2005-03-27');
INSERT INTO Provider (ProviderID, LastName, FirstName, HireDate)
VALUES ('123460', 'Thomas', 'Brett', '2020-01-15');
SELECT*FROM Provider;
SELECT LastName, HireDate FROM Provider;
SELECT DISTINCT HireDate FROM Provider;
SELECT LastName, FirstName FROM Provider WHERE ProviderID = '123456';
SELECT ProviderID, LastName FROM Provider WHERE Hiredate >= '2010-01-01';
SELECT*FROM Provider WHERE HireDate BETWEEN '1990-01-01'
AND '2020-03-31';
SELECT ProviderID, LastName, FirstName FROM Provider WHERE HireDate is NULL
ALTER TABLE Provider ADD COLUMN Salary float;
UPDATE Provider SET Salary = 65000 WHERE ProviderID = '123456';
UPDATE Provider SET Salary = 9500 WHERE ProviderID = '123457';
UPDATE Provider SET Salary = 142000 WHERE ProviderID = '123458';
UPDATE Provider SET Salary = 130000 WHERE ProviderID = '123459';
UPDATE Provider SET Salary = 160000 WHERE ProviderID = '123460';
SELECT*FROM PROVIDER;
Plain Puffin