A

@Anushka_G9

Homework:)

MySQL
1 year ago
create table FANS ( admn INT PRIMARY KEY(), name TEXT NOT NULL(10), stream TEXT NOT NULL(10), optional TEXT NOT NULL(10), score INT(1), ); INSERT INTO FANS VALUES (1001,"Shrishi","Science","CS",90);

Update and alter

MySQL
1 year ago
create table IF NOT EXISTS College( ID int(1), Name text(20), Stipend text(8), Subject text(17), Percentage int(2), Position text(2) ); Insert into College values(1,"Anuj",4000,"English",65,"P1");

Mini Project 1

MySQL
1 year ago
create table Products( ID int(4), ProductName varchar(40), Price int(10), Quantity int(4), Profit DECIMAL(4,2), Discount DECIMAL(4,2), DateOfPurchase Date );

Like, null, not null and order by

MySQL
1 year ago
create table University( ID int(4), FName varchar(20), Sal int(10), Hiredata Date, PRIMARY KEY (ID) ); Insert into University(ID, FName,Hiredata) values(101,"Akshu","1880-10-12"); Insert into University values(102,"Aman",340000

More on select Query

MySQL
1 year ago
create table Senders( ID int(4), Name varchar(20), City text(20), Address varchar(100) ); Insert into Senders values(5101,"Mr.Ram", "New Delhi","201 DayanandVihar"); Insert into Senders values(5102,"Mr.Kumar", "Mumbal","125 Townhall

Select Queries

MySQL
1 year ago
create table IF NOT EXISTS College( ID int(1), Name text(20), Stipend text(8), Subject text(17), Percentage int(2), Position text(2) ); Insert into College values(1,"Anuj",4000,"English",65,"P1");

Inserting data into the table

MySQL
1 year ago
-- INSERTING DATA INTO THE TABLE /* CONSTRAINT 1. NOT NULL This restricts the states that a column cannot contain a null value. 2. UNIQUE When used with a column, this constraint specifies that each value in the column must be distinct.

Creating a table

MySQL
1 year ago
/* INTEGER TinyInt - 1 bytes SmallInt - 2 bytes mediumInt - 3 bytes int - 4 bytes BigInt - 8 bytes DECIMAL