Create a information kind with a high quality value
UNSIGNED
Designating a foreign key in CREATE TABLE assertion
FOREIGN KEY (ColumnName)
REFERENCES Tablename(ColumnName),
Command to feature a column to an existing desk
ALTER TABLE TableName
ADD COLUMN ColumnName DATATYPE;
SQL statement to create a view call Myview that carries X, Y, Z columns from the Maintable
desk.
CREATE VIEW Myview AS
SELECT X, Y, Z
FROM Maintable;
SQL statement to delete the view named Myview
DROP VIEW Myview;
SQL announcement to modify the Test table to make the ID column the primary key
ALTER TABLE Test
ADD PRIMARY KEY (ID);
Write a SQL assertion to designate the Year column inside the Movie desk as a overseas
key to the Year column inside the YearStats table.
ALTER TABLE Movie
ADD FOREIGN KEY (Year)
REFERENCES YearStats(Year);