Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
50 views
17 pages
DBMS File Comp-1
Bdms file
Uploaded by
nikhilkaintura8254.12e
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save DBMS file comp-1 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
50 views
17 pages
DBMS File Comp-1
Bdms file
Uploaded by
nikhilkaintura8254.12e
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save DBMS file comp-1 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save DBMS file comp-1 For Later
You are on page 1
/ 17
Search
Fullscreen
{syntax : implementation:| ==] Output : mysql> show databases; _ os yes : | Database I + 4 | information_schema | | mysql | | performance_schema | I sys | | users a [Name : Cacate . [About : Ord de ouolt dabke Ina | derta bang, Syntax : courte tabi name (waluas type, =~)e| Implementation : couatt tab Sudo’ Cyl (Ar not null pochnas Ken, NOMA NaKcroalge) Poul Name vooehas(20), ago for)s Output: mysql> create table students( -> roll int not null primary key, -> name varchar(20), -> parentName varchar(20), -> age int); 0 rows affected (0.02 sec)IName : Tnx sh oe About : Jad Ae wi dala nde tables + Syntax : Touwi¥h ‘ele a blenaray va lus ( ‘esv)s Implementation : Toot inlo sludest valus( 20, Tahar, THamada’, 1) 2 Output : mysql> Insert into students values ( 20, Jake’, ‘Hamada’, 16); Query OK, 1 row affected (0.01 sec) mysql> select * from students; beeches oes | roll | name | parentName | age | peeeeeteeeetonn aon | 2|Cloe|grian | 19] | 20|Jake | Hamada | 16] + es Name : Select About : Dard ute select s6me arnoust co ta. goromn atable: Syntax : Implementation : Selet columnnames Output : Aclict * pm Nu dint Prateskidaurya/imysab select * from students; teveecetheneecennnenhanenen f | roll | nam name el parentNeme | age | 1 1 abla, yay :Name : About : [Dist Name: Sliminatis th ve puated iat Volucs em dha Been AT af colum Syntax : deck dian columnNane perm “blero Implementation : malet disine’ nome pom Duden « Output : mysql> select distinct name from students; | 3 rows in set (0.01 sec) Name: twhore About : Und 46 specify emdstion je Arusu'es « Syntax : seket colum rom table who condidion Implementation : | Aaclect 3 from Budsk whos woll = 208 | Output : mysql> select * from students where roll = 20 a hanna : [ roll | name | parentName | age | + jamada | 16 | +UU Name : Not About : Tig Uae OF not ppanater es nagar on 4 cond) Hrs - Syntax nbd & fiom Betws Fable, whov Implementation : pot colton? Output : mysql> select * from students where not name = E> ft + [roll | name | parentName | age | at ft | 20| Jake | Hamada | 16| | 31| Rahul | Raj | 20| + Name: Rn About : Utd a3 and opposer Ge cme eal 4wo condense : a | condition and canditions silot * Jxom BadeAta hse ~ \ - ft aames ' Alia’ and porunt Nam8 Rad! ka’; PrateekMaurya/mysq|> select * from students wher: ° @ name = Implementation : Output :Name : OR to BY OR Mate About : Und os indepondent- tmdition: ; Syntax : Condo tond'Hian _ConwTts) Implementation : caelect X duo — gladurty Wwhow rong 2 'Takal ot oll 312 e = Jake’ or roll = 31; : mysqi> select * from students where name = ‘Jake’ or roll = 31; Output : oe Ga ees pais | roll | name | parentName | age | ett tot | 20| Jake | Hamada | 16] | 31| Rahul | Raj | 20 qa tt Name : Oso By About : Vard AS taply twholk da Gort oidvud By a column 19 Spare pe Syntax : Sle ck céfissp om tobk Hdes py Col urn Implementation : Output : sel * ed sudan mo 4 ones J mysql> select * from Students order byage; bn ton acti | roll | name | parentName | | age | 1] Aisa | Andy | 13] | 20| Jake |Hamada | 16 | | 20] | 22]Name : About : eo) oe ae by aeafor chseending orders Syntax : vod by eodiven DESC? Implementation : \ ae lect % shorn Bludersty oder by Ofe Deses * from students order by age DESC; Output : PrateekMeurya/mysa select rom stu 5 roll | name | parentName | age | + es | 2| Aisa | Radhika | 22 | | 31] Rahul | Raj | 20) | 20 | Jake | Hamada | 16 | | 1| Aisa | Andy | 13] + Name : OPDatr 7 About : Changs thevalius in a tab 63 dha ghuen cam ch'Hony . Haeee Updo Fob Act cha whew Land ape Implementation : update Sudonts Ace P nt ny = grain who names 'cloe' mysql> update students set parentName =) Query Ok, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 sql select * from students; Brain’ where name = "logyoe Tie aon ke fron | a ta ble Syntax : Deleb pean tabu » hore LondHien $ Implementation : Dele from Srudeitg whou Holl=207 Output : mysql> delete from students where roll = 20; Query OK, 1 row affected (0.01 sec) mysql> select * from students; ee Name: Min Abi : a Rtusins Minin lement prom S2tene) Acleckd column. Syntax : Arleet min column) storm tobl Implementation : xelret min Cage’) juom Sudnt; Output : mysql> select min(age) from students;Name : Many About : Relwing row element stom the MEN column ? Syntax: select ro Ceolumn) pom Aabley Implementation : palo ror lage) jpem Bluderstay Output : PrateekMaurya/mysql> select max(age) from students; aeLitke | Ss © aba qornt fe Hod which is we 19 cond ans secu ch cya lus | syntax 3 DM leek osdore fob. whuu Oe Implementation : oli ko nia’ ay Loh xoduom Sudest wher nor UK Fores mysql> select * from ‘student where name like 'r% [Output : q fete tot | roll | name | parentName | age | pooceont | 10 | rawni| raju | NULL | 31] Rahul| Raj | 20] Name: AT: | About : Usd +0 dind values Ushich bel te 0 andy a values. rd ¥ Syntax : ~ == whe column jn (volw!2) Implementation : solel X piom Mudent rame inl! jake", Sahu! Je Output : mysqj> select * from student wher in (5 e nami 7 t "); meet peat eater fia a e in (‘jake’, 'rahul'); [roll | name | parentName | age | Jake | Hamada | 161— : ertus n. ai ; ae Saul, wilh Canditien fo" sedi) Je a sarge g value a. Phe phate column betwen _ord_y Implementation : prhween °F 12 and 18 solect * por gludest whey age Output : PrateekMaurya/mysqi> select * from student where age between 13 and 18; + oe tot [roll | | parentName | age | tt —+—+ | 1] Aisa] Andy | 13] | 20 | Jake | Hamada | 16] feet penne Name : AS Calias) About : Replaces nanu & @ column dusd hs fateh ancl Aalect’s J Syntax : sabert Column a3 Auwcol nie Implementation : sob poourt/Vams a3 beuardian pean Sluderrt 3 Output : ‘mysql> select parentName as Guardian from student; | Guardian | ft [Andy | | Radhika | [raju | [Hamada | [Raj | otj IN : : Tats + Ssallans fru va les wohich. hows jndoacetion 6) vale in two cables - synteny s sacl abled Inner join -eolumn\ table2, on Implementation : tebe. colamn = dabucz Baw aa lect * ye sludert inner yon admiasionat OO dudertbvoll = admisitst. s1allno; Output : mysql> select * from student inner join admissionlist on student.roll = admissionlist.rollno; + | roll | name | parentName | age | admission | rolino | fullname | + as eae penne | 689 | Aisa| Andy | 13] 32] 689|JohnDoe | | 831 | Jake | Hamada | 16| 78] 831 | Robert Wilson | to a Name: daft join: About : Just ~ Dike NNw join but includes s StomnaIning net Luss ofoat column, Syntax : Jaslect » from fabla). us join fobl2 on Implementation : tabty column = tobk S-columy aaleb ¥ Budrt be voln admissadbist on sludot® Ho UW = acl ston ist ove ltnos Output : See student left join admissionlist on student.roll = ee: 4 —+ [roll | name | parentName | age | admission | roling | fullname + 2| Alsa | Radhika | 22) NULL] NULL] NULL I [NULL | NULL] NULL] NULL = | | 20] NULL] NULL] NULL | 32| 689|JohnDoe | 78| 831 | Robert Wilson | +; ral [Name : fei In. About : Tot Gea Wt join but he vd in cludes 9 samainin ae of Axto dab thy off E Syntax : ae ote den table xight dee : @ doblo on Ytoblex = sahl2-* } salt x pum gudett sign jo? AdmiasimUst on @udent.s 0 QdmiatonUst ~ Ho llno. Implementation : Output : PrateekMaurya/mysql> select * from student right join admissionlist on student.roll = admissionlist.rollno; | roll | name | parentName | age | admission | rollno | fullname — | proceeeheceeeeheeeennnnenaneee a —— + | 689 | Aisa| Andy | 13] 32| 689|JohnDoe | [NULL | NULL] NULL | NULL] 34] 367] Emily Davis | [NULL] NULL] NULL | NULL] 45] 227 | JaneSmith | [NULL] NULL] NULL =| NULL] 76] 127 | Michael Johnson | | 831 |Jake | Hamada | 16] 78| 831] Robert Wilson | te a ee Name: | { Count About : Counts no. of Na tuts 1” giro column at Syntax : Sect courrCeolumn) duom tables Implementation: | go tyct count C¥) dhcorm SludeAt- group a namsg mysql> select count(*) from student group by name; +i DRoP. rors WF ud te lel 4obu/covobae Syntax: Dowp tobl/dalabax Larne ? Implementation : Cxop table wudnt; Output : mysql> drop table students; Query OK, 0 rows affected (0.02 sec) : mysql> select * from students; ERROR 1146 (42502): Table ‘users.students' doesn't exist Name : Teuncals About : . MH jg wad dé chikte all valu jprom the Ginen dabk. Syntax : founcote abl, toblename + Implementation : +xuneate table wren: Output : mysql> truncate table users; Query OK, 0 rows affected (0.03 sec) mysql> select * from users; Empty set (0.00 sec)aBeuet ee a add /ehange column? +0 dobu Syntax : pNex table Aome ducky) acd enor Fepus Implementation : alten table. Budint add clans sya choy G): PrateekiViaurya/mysqi> alter table student add class varchar(1); Output : : Query OK, 0 rows affected (0.02 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> select * from student; ae es | roll | name | parentName | age | class | opneeancneebeccnenbeeneeh isa | Radhika | 22| NULL | | 10 | rawni | raju | NULL | NULL | | 31] Rahul | Raj =| 20] NULL | — + Name : Sum. Sea 7 ett Finds Surs alt element of gina Column . Syntax : dell cum ( colurnn) prod iss Implementation : deleb coum lage) jprom, Sucka s Output : mysql> select sum(age) from student; fhe + ‘: Aljex : aes Uua +o add /ehonge column +6 dobU Syntax : Na, Abu Moms’ Guides add cnarne fepss Implementation : alten, table Bludint add claw vax Choy ti): PrateekMaurya/mysql> alter table student add class varchar(1); Output : Query OK, 0 rows affected (0.02 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> select * from student; + | roll | name | parentName | age | class | - | 2| Aisa | Radhika | “22 | NULL | | 10 | rawni| raju | NULL | NULL | | 31 | Rahul | Raj | 20| NULL | Name: x um, About : y Finds Sura all elumant 4 grunl Column . Syntax : Soloed dum (column) pron l : Output : Implementation : ath un pl foam dhaknt mysql> see sum(age) from Student;: DN Gr Canasage) ea Fin owoigd ) ied aan, Syntax : palict avg Coolum) table Implementation : erbett arg Lagi) pom dudent § Output : mysql> select avg(age) from student; | ave(age) | bot | 17.7500 | Name: Count About : Count’ no. of SOW; Jn give colunn, Cray ned © 46 solinfd & Condition), Syntax : Atlet court (ce lumn)ghiom table» Implementation : aolket count (x) spor studs rit: Output : _| ba + | count(*) | to + | mysql> select count(*) from students;Full Join Spout At dinds csoaa. powoduct of each. About : i Ad avo entole pom fogt table | dab ——__— [ Syntax: getrct column porn table! oT ‘in. tabl2s Tt n implementation: | 92eL X om Hudink fut Jo ‘ ad miasion Liat ° Output : Pratekaurya/mysa select * fom student ful join admisionist | [roll | name | parentName | age | admission | rollno | fullname 1 + — | 831 | Jake | Hamada | 16 | 32 | 689 | John Doe 1 689 | Aisa | Andy 1 13] 32 | 689 | John Doe | | 31 | Rahul | Raj | 20] 32| 689 | John Doe 1 10 | rawni|raju | NULL] 32] 689|JohnDoe | 2| Aisa | Radhika | 22| 32] 689|JohnDoe | 831| Jake |Hamada | 16| 34] 367] Emily Davis | 689] Aisa | Andy | 13] 34 367] Emily Davis | 31] Rahul | Raj. | 20) 34] 367 | Emily Davis | 10 rawni | raju | NULL 34] 367 | Emily Davis | 2 |Aisa | Radhika | 22| 34] 367 | Emily Davis | 831 | Jake |Hamada | 16| 45] 227 | Jane Smith I | 689 | Aisa |Andy | 13] 245!" 227 | Jane Smith | 31 [Rahul | Raj | 20. BAST 297 | Jane Smith | 10 | rawni|raju | NULL | 45 | 227 | Jane Smith I 2 Aisa | Radhika | 22| 45 | 227 | Jane Smith | 831 | Jake |Hamada_ | 16] 76 | 127 | Michael Johnson | 689 | Aisa |Andy | 13] 76] 127 | Michael Johnson | 31| Rahul | Raj | 201-76 127 | Michael Johnson | 10 | rawni | raju | NULL 1 76| 127 i | ani slag | Michael Johnson | 122) 761 127) mi 831 [Jake |Hamada | 16] 7g | at eee hnson | 689 | Alsa |Andy | 13] 78 831 | Robert Wilson. } 31 [Rahul | Raj | 204 781 831 | Robert wit mi 10 rawnl |raju | NULL] 78] a 83. i Aisa | Radhika | 22 | 11 Robert Wilson. | ees *
You might also like
Important MySQL Short Notes PDF For Beginners 2021
PDF
No ratings yet
Important MySQL Short Notes PDF For Beginners 2021
10 pages
Ashish DBMS File
PDF
No ratings yet
Ashish DBMS File
36 pages
SQL Handwritten Notes
PDF
No ratings yet
SQL Handwritten Notes
21 pages
Lab1 Asmamaw-2
PDF
No ratings yet
Lab1 Asmamaw-2
19 pages
Practical 2
PDF
No ratings yet
Practical 2
10 pages
SQL Most Important Concepts-Part 1
PDF
No ratings yet
SQL Most Important Concepts-Part 1
46 pages
Program 11 Create A Binary File With Name and Roll No. Search For A Given Roll Number and Display The Name, If Not Found Display Appropriate Message
PDF
No ratings yet
Program 11 Create A Binary File With Name and Roll No. Search For A Given Roll Number and Display The Name, If Not Found Display Appropriate Message
16 pages
SQL Commands
PDF
No ratings yet
SQL Commands
19 pages
CPS405 ch04
PDF
No ratings yet
CPS405 ch04
52 pages
DBMS Journal
PDF
No ratings yet
DBMS Journal
23 pages
LabManual (18 21)
PDF
No ratings yet
LabManual (18 21)
11 pages
DBMS Practical Section A
PDF
No ratings yet
DBMS Practical Section A
13 pages
Dbms PRACTICAL 4-5-6-7-8-9
PDF
No ratings yet
Dbms PRACTICAL 4-5-6-7-8-9
15 pages
SQL Term 2 Comp Practical
PDF
No ratings yet
SQL Term 2 Comp Practical
8 pages
Mysql Questions
PDF
No ratings yet
Mysql Questions
7 pages
Adobe Scan 21 May 2024
PDF
No ratings yet
Adobe Scan 21 May 2024
20 pages
SQL 4
PDF
No ratings yet
SQL 4
5 pages
SQL 3
PDF
No ratings yet
SQL 3
4 pages
MYSQL - Cmds
PDF
No ratings yet
MYSQL - Cmds
7 pages
Dbms Lab
PDF
No ratings yet
Dbms Lab
52 pages
Class 12th Practical File
PDF
No ratings yet
Class 12th Practical File
18 pages
Review: Show All The Information About Every Student Including Phones But Cities
PDF
No ratings yet
Review: Show All The Information About Every Student Including Phones But Cities
6 pages
SQL Commands
PDF
No ratings yet
SQL Commands
10 pages
Assignment cs2
PDF
No ratings yet
Assignment cs2
16 pages
Dbms Record1-4
PDF
No ratings yet
Dbms Record1-4
26 pages
Practical File of SQL Queries Dbms 24 25
PDF
No ratings yet
Practical File of SQL Queries Dbms 24 25
12 pages
Practical No 5.1
PDF
No ratings yet
Practical No 5.1
3 pages
List of Programs
PDF
No ratings yet
List of Programs
28 pages
Velammal Vidyalaya Practical Programs-Term2 Class XII-Computer Science 2022-2023
PDF
No ratings yet
Velammal Vidyalaya Practical Programs-Term2 Class XII-Computer Science 2022-2023
16 pages
102 Copies Database Lesson 2
PDF
No ratings yet
102 Copies Database Lesson 2
7 pages
DBMS Final
PDF
No ratings yet
DBMS Final
38 pages
Suranjan SQL Noats 5
PDF
No ratings yet
Suranjan SQL Noats 5
9 pages
Sql-Most Important Concepts Placement Preparation: (Save and Share)
PDF
No ratings yet
Sql-Most Important Concepts Placement Preparation: (Save and Share)
46 pages
Program File Class12
PDF
No ratings yet
Program File Class12
16 pages
Computer Science Class 12 CBSE - Structure Query Language
PDF
No ratings yet
Computer Science Class 12 CBSE - Structure Query Language
41 pages
12th Lab Practical
PDF
No ratings yet
12th Lab Practical
20 pages
Mysql Syntax
PDF
No ratings yet
Mysql Syntax
8 pages
DBMS Lab Record 2017-18 2.0
PDF
No ratings yet
DBMS Lab Record 2017-18 2.0
57 pages
Dbms Lab
PDF
No ratings yet
Dbms Lab
44 pages
SQL Commands
PDF
No ratings yet
SQL Commands
11 pages
My SQL: #To Show All Databses Availaible
PDF
No ratings yet
My SQL: #To Show All Databses Availaible
13 pages
SQL - Commands - Syntax H - R-1
PDF
No ratings yet
SQL - Commands - Syntax H - R-1
5 pages
MySQL Pratical Notes
PDF
No ratings yet
MySQL Pratical Notes
9 pages
DocScanner 21-Dec-2024 1-07 PM
PDF
No ratings yet
DocScanner 21-Dec-2024 1-07 PM
40 pages
SQL Handwritten
PDF
No ratings yet
SQL Handwritten
30 pages
SQL Complete Course
PDF
No ratings yet
SQL Complete Course
14 pages
DBMS Lab Report
PDF
No ratings yet
DBMS Lab Report
20 pages
Mysql Syntax
PDF
No ratings yet
Mysql Syntax
26 pages
DBMS Experiment-4
PDF
No ratings yet
DBMS Experiment-4
10 pages
DBMS Practical 6
PDF
No ratings yet
DBMS Practical 6
4 pages
Mysql Commands
PDF
No ratings yet
Mysql Commands
16 pages
Lab Ex 1
PDF
No ratings yet
Lab Ex 1
17 pages
Class 12 Computer Science-Updated
PDF
No ratings yet
Class 12 Computer Science-Updated
19 pages
Database SQL Query
PDF
No ratings yet
Database SQL Query
17 pages
Practical Program SQL
PDF
No ratings yet
Practical Program SQL
12 pages
SQL Queries
PDF
No ratings yet
SQL Queries
6 pages
SQL Commands More
PDF
No ratings yet
SQL Commands More
14 pages
Experiment No. 1 DBMS Creating A Database
PDF
No ratings yet
Experiment No. 1 DBMS Creating A Database
12 pages
Class 12 CS Practical Exercises - 2024 SQL
PDF
No ratings yet
Class 12 CS Practical Exercises - 2024 SQL
15 pages