Posts

Showing posts with the label DML

5 - DML commands used in MySQL WorkBench

Image
DML(Data Manipulation Language)  CREATING A TABLE create table employees( emp_id int not null , first_name varchar ( 20 ) not null , last_name varchar ( 10 ), salary int , primary key (emp_id) ); INSERTING DATA IN TABLE insert into employees(emp_id,first_name,last_name,salary) values ( 1 , 'Zeeshan' , 'Khan' , 50000 ); insert into employees(emp_id,first_name,last_name,salary) values ( 2 , 'Ross' , 'Geller' , 60000 ); insert into employees(emp_id,first_name,last_name,salary) values ( 3 , 'Rachel' , 'Green' , 8000 ); insert into employees(emp_id,first_name,last_name,salary) values ( 4 , 'Joey' , 'Tribbiani' , 99000 ); select * from employees; UPDATING OR CHANGING DATA update employees set last_name= 'Geller' where emp_id= 3 ; select * from employees; DELETING DATA  delete from employees where emp_id= 4 ; select * from employees; OUTPUT GENERATED

3 - SQL Starting(Introduction, Data-Types,Constraints and Command-Groups)

Image
  What is SQL? In simple words,SQL(Structured Query Language) is a programming language specifically defined for working with data-base to  --> CREATE --> MANIPULATE --> SHARE/ACCESS or SQL stands for Structured Query Language is used for storing and managing data in relational database management system (RDMS).  It is a standard language for Relational Database System. It enables a user to create, read, update and delete relational databases and tables. SQL Data Types Data types are used to represent the nature of the data that can be stored in the database table. For example, in a particular column of a table, if we want to store a string type of data then-->  we will have to declare a string data type of this column. Data types mainly classified into three categories for every database. --> String Data types --> Numeric Data types --> Date and time Data types 1- String                - char , varchar ,...