|
1 |
| -# SQLBasics |
| 1 | +# SQLBasics |
| 2 | +--- Creating A Database--- |
| 3 | + |
| 4 | +Create Database SampleGitHub |
| 5 | + |
| 6 | +--- Creating a table inside above database and creating columns-- |
| 7 | + |
| 8 | +create table Customer |
| 9 | +( CustomerName varchar(20), |
| 10 | + CustomerSurname varchar (20), |
| 11 | + Age int |
| 12 | + ) |
| 13 | + |
| 14 | + |
| 15 | + ---Inserting values inside a table-- |
| 16 | + |
| 17 | + insert into Customer (CustomerName,CustomerSurname,Age) |
| 18 | + VALUES ( 'shantanu','jadhav',30); |
| 19 | + insert into Customer (CustomerName,CustomerSurname,Age) |
| 20 | + VALUES ( 'swapnil','bagul',28); |
| 21 | + insert into Customer (CustomerName,CustomerSurname,Age) |
| 22 | + VALUES ( 'kruz','aher',31); |
| 23 | +insert into Customer (CustomerName,CustomerSurname,Age) |
| 24 | + VALUES ( 'Amol','Harde',31); |
| 25 | +insert into Customer (CustomerName,CustomerSurname,Age) |
| 26 | + VALUES ( 'pratik','phadtare',25) |
| 27 | + |
| 28 | + |
| 29 | + select * from Customer /* Displays complete Customer table */ |
| 30 | + |
| 31 | + select CustomerName,Age from Customer /* Displays only perticular columns from the table*/ |
| 32 | + |
| 33 | + |
| 34 | + |
0 commit comments