365 User Management

How to add users in Microsoft office 365

Here I am going to explain the steps how to add standard user and admin user in Office 365

Steps: Login to admin.microsoft.com with admin privileges.

I am creating first Standard User.

Click to active users

 Active users list will be appear

Now here creating new user in custom domain

Click to add user

Basic Details about creating user

And next

User cannot changed password and password will send to administrator account

And click to next

Have selected here Business Standard

Now to click next

Select no admin center access and click next

Finish now and login to created user or reset password

So here is the created user’s details

Login as user

Click next here will be authentication check

Download Microsoft authenticator application

Scan and authenticate

Standard User Password

Have Login to Created standard user

Click on Install apps select app and download it

MS Office Setup File Downloaded

Install Downloaded file and use the office 365 Services.

ADD Admin User IN Microsoft Office 365

Fill here required details about Administrator which you wanted to create

Here password automatic generated and Global Admin will received the admin password on registered email id

Once done next button

Select office license and click to next

Administrator account assign

Selected administrator roles and click to finish

Created admin user

Created admin user Dashboard

Can’t Connect to Internet?

Here I will share the steps

 How to troubleshoot.

How to Troubleshoot Internet if you are not connected to internet

Once you will face any kinds of network connection issues

Open command promote

Win+r

Type cmd

So, type ipconfig or ipconfig /all

I am not getting any IP Address but adaptor displaying undefined network

So, there is multiple options to troubleshoot Network connection

First Method:

Right click to active adaptor and disable adaptor

Now enable it

Still internet is not working

Still internet is not connected showing undefined network

Now,

Checking step 2:

Sometimes same ip address assigned to multiple devices this can be a loop hole

ipconfig /release

C:\Users\shari>ipconfig /renew

domain name system (DNS)

If still not working flushdns

If still not working insert DNS like Google or Oracle dns

216.146.35.35  dns

216.146.36.36  dns

After updating static dns internet is working

Or we can also try google.com dns

IP addresses 8.8.8.8 and 8.8.4.4 as your DNS

So main cause is our DNS

So this is the process to rectify network issues

Internet pinging status

Static Internet Protocol (IP)

How to Assign Static Internet Protocol (IP) to Server and Laptop/Desktop PC

Press Win key and r

And type

Ncpa.cpl

One popup window will be open similar to this

Right Click on active Network Adaptor

Go to properties

Select IPV4 Address click select the Properties and edit

Here will apply static IP Address

Here you need to check the IP Series Class

According to you IP Series you need to assign IP to PC or Server.

We need to Assign Internet Protocol series with subnet

Note: not necessary to add Default Gateway or DNS it will auto fetch  

Once assign static IP Check the Network Status

IP Address Status

Distributed File System

DFS is a method or a process to increase the consistency of Shared file server.

DFS in a Windows Server Infrastructure & DFS Replication

It’s difficult to recall all file server in Infrastructure so, Microsoft implemented Distributed file server.

DFS is a technology to manage multiple shared files from single server but actually DFS picked the data from original location.

Distributed File System- (DFS) – DFS is a Windows Server feature which allows System Administrators to create a single namespace to provide a replicated sharing infrastructure across the network. 

Here I am going to explain how to install DFS in your Infrastructure.

Select which wins server you wanted to become Primary File shared server.

Go to windows server

Open windows server manager.

Click to add roles and features

Installation will be on Role Based feature-based installation

—Steps

Install Distributed File System from server Manager

Start DFS from tools

Create new Namespace server

    Again, create new namespace server inside created namespace server

Create new folder inside namespace

Add folder target for replication jobs

—     

Select DFS Replication and Namespace

Once selected click too next

DFS is ROLES based installation.

And roles added make all default installation.

(We need to Install DFS Roles on all File Server which will be associate with Main File Server.

Like example: I am having Primary Server I need to associate all my file server will associate with Primary server with the help of DFS ACTUALLY file server will be on his original location but they act like hosted with primary server.

)

Check the features leave as default and click too next

Now click to install

Once installation done click to tools

Now close wizard after installation done

Now click to tools and select dfs

Once DFS Wizard open click to namespace primary file server and create new namespace

Enter the host namespace server so, primary server will be hosting browse primary server

Once select server name click to next

Time the Shared file name edit permission setting click to custom permission add users and apply

Now select domain based namespace

And click to create namespace

Once done close wizard

Now adding the file server to primary server inside the created namespace

Right click on created namespace and add new namespace server

Browse file server machine name and assign permission and click to ok

Click ok Wizard

Namespace server having two now

So, now need the target folder right click and click new target folder

File Server Directory

Click to folder right click and select to folder target

Browse the target folder and select that

Once selected click okay

Replication job verification click yes

Once replication wizard change the replication name or leave as default

Now click to next

Primary member

Topology

Click to next

Now click to create replication job

Created successfully

Replication one server to another server

Now here I am checking and sharing File Server using Secondary Server (Because I don’t want to share my Primary server’s name to Infrastructure users).

Here: I am having all data to my primary server but just using to replicate and hide my primary server details to users.

Start DFS in Secondary server

Assign user permission

Domain based name space

Now click to create

Namespace created close the wizard

Right click to created namespace and create new namespace to created server

Browse server

So now here NEW namespace server creating behalf of bdc server

Namespace server status

Namespace servers

Now creating the folder

Browse the shared folder and select that

Selected folder

Click okay

Created folders

Now select the folder and add the replication target

Select the folder target

Now click okay

Now replication job will be created

Once replication started here configure it

Again, click to next

Select the primary server

Select full mesh

Schedule bandwidth

create replication job

Created replication job

Directory Structure

using DFS useful for even security complete hide the Directory Structure

MBR/GPT Difference

MBR/GPT Difference

Bare metal server — Install OS to Direct Physical server know as bare metal server.

Master Boot Record

MBR—-

MBR Support BIOS Legecy mode

it’s old partition table

MBR Support up to 2TB Hard Disk not more then 2 TB  Hard Disk

it will support 3 Partition table

slow to boot

no unique identification

crrupt data is not recoverable

not much secure only password on BIOS

boot partition and data store in one place.

How to check boot VM running on which Firmware in VMWARE

Click to edit

Vmware machine setting in any os

Click on vm and edit machine expand BOOT options

Check and select the firmware

So here selected machine is running MBR disk Format

Master boot record support BIOS.

GPT  —–

GUID Partition Table

GPT Support for UEFI Mode -VMWARE Vsphre EXSI using EFI –UEFI and EFI is same.

it is new partition table

it is support up to 10 TB

GPT Support 128 Primary partition

Fast boot

Universally unique identifiers

Cyclic Redundancy Check (CRC) GPT notic the problem and able to recover automatic

data can easly recoverable

more secure

boot partition and data stored in multiple places

want to check which boot firmware supporting go to machine click to edit

click to VM options

expand Boot Options

Firmware is currently EFI(UEFI) mode

PHP Config.php file Using OOPS

Here i have Write Oops Config file in Core PHP 

<?PHP 
  session_start();
  class Database 
{
      private $folder_name;
      private $host_name;
      private $user_name;
      private $password;
      private $db_name;
      private $con;
      private $result;
      function __construct()
      {
if($_SERVER['HTTP_HOST'] == 'localhost'){  //(if we will use it in local server xampp)
              $this->folder_name = '/test/';
              $this->host_name = "127.0.0.1";
              $this->user_name = "root";
              $this->password = "";
              $this->db_name = "test";
          }else{
              $this->folder_name = "/test";  //(if we will use it in Hosting server)
              $this->host_name = "127.0.0.1";
              $this->user_name = "sharique";
              $this->password = "sharique";
              $this->db_name ="test";
          }
$this->con = mysql_connect($this->host_name, $this->user_name, $this->password)
          or die("Couldn't connect to the database".mysql_error());
          mysql_select_db($this->db_name,$this->con);

}
public function execute($query){
          $this->result = mysql_query($query, $this->con);
      }
public function getResult(){
          return mysql_fetch_assoc($this->result);
      }
public function getResults(){      $return = array();      while ($row = mysql_fetch_assoc($this->result)) {          $return[]=$row;      }      return $return;  }  public function rowCount(){      return mysql_num_rows($this->result);  }  public function LastId() {     return mysql_insert_id(); }  public function affectedRows(){      return mysql_affected_rows();  }
 } 

if($_SERVER["HTTP_HOST"]=="192.168.1.194:8081"){
     $folder_name='/Testing/';
 } else {
     $folder_name='/';
 }
 $root = 'http//'.$_SERVER['HTTP_HOST'].$folder_name;
 $doc_root =$_SERVER['DOCUMENT_ROOT'].$folder_name;
 $css_root = $root. 'css/';
 $script_root=$root.'js/';
 $lib_root = $root.'lib/';
 $include_root = $root.'include/';
 $images_root = $root.'images/';
 date_default_timezone_set('Asia/Calcutta');
 $date=date('Y-m-d H:i:s');
 $modified_date=date('d-M-Y, D');
 $site_title="Testing";
 define("WEB_ROOT",$root);
 define("DOC_ROOT",$doc_root);
 define("CURR_DATE",$date);
 define("MODIFIED_DATE",$modified_date);
 define("CSS_ROOT",$css_root);
 define("LIB_ROOT",$lib_root);
 define("INCLUDE_ROOT",$include_root);
 define("SCRIPT_ROOT",$script_root);
 define("IMAGES_ROOT",$images_root);
 define("SITE_TITLE",$site_title);


?>

PHP Config page using mysqli
CONFIG.PHP 
<?php 

$servername =  'localhost'; $username  =   'root'; $password  =   ''; 

$dbname    =   'databasename';

$connection=mysqli_connect($servername,    $username, $password, "$dbname");
     
if(!$connection)         {           die('Could not Connect MySql Server:' .mysql_error());     } 

/*$mysqli = new mysqli("localhost","root","","databasename");  if ($mysqli->connect_errno) {     printf("Connect failed: %s\n", $mysqli->connect_error);     exit(); } */

 ?>

INDEX.PHP

<h2 class="title">Registration Info</h2>                     

<form method="POST" action="insert.php" name="insertform">                         <div class="input-group">                             
<input class="input--style-1" type="text" placeholder="NAME" name="name" id="name">                         
</div>                         
<div class="input-group">                            
 <h1>Show Checkboxes</h1> <br>                           
  <input type="checkbox" name="vcl[]" value="Bike">                             <label for="vcl"> I have a bike</label><br>                             <input type="checkbox" name="vcl[]" value="Car">                             <label for="vcl"> I have a car</label><br>                             <input type="checkbox" name="vcl[]" value="Boat">                             <label for="vcl"> I have a boat</label><br><br>                         </div>                         
<div class="row row-space">                             
<div class="col-2">                                 
<div class="input-group">                                    
 <input class="input--style-1 js-datepicker" type="text" placeholder="BIRTHDATE" id="birthday" name="birthday">                                     <i class="zmdi zmdi-calendar-note input-icon js-btn-calendar"></i>                                 </div>                            
 </div>                             
<div class="col-2">                                
 <div class="input-group">                                     
<div class="rs-select2 js-select-simple select--no-search">                                         <select name="gender">                                            
 <option disabled="disabled" selected="selected">GENDER</option>                                             <option>S</option>                                             <option>M</option>                                             <option>F</option>                                             <option>O</option>                                        
 </select>                                         
<div class="select-dropdown"></div>                                     </div>                                 
</div>                            
 </div>                             
<div class="col-2">                             <tr>                                 <!-- checked radio button -->                            
 <td align="left">User Gender : </td>                              
   <td>                              
 <input type="radio" name="user_gender" value="Male"> Male                                                                
 <input type="radio" name="user_gender" value="Female"> Female                               <input type="radio" name="user_gender" value="Other"> Other                             </td>                           
  </tr>                            
 </div>                            
 <div class="col-2">                               
  <div class="input-group">                               
   <tr>                                    
 <td>Hobbies</td>              
                       <td>                                            <input type="checkbox" name="hobbies[]" value="cricket"/>Cricket                                        <input type="checkbox" name="hobbies[]" value="football"/>football                                        <input type="checkbox" name="hobbies[]" value="tenis"/>Tenis                                        <input type="checkbox" name="hobbies[]" value="vollyball"/>Vollyball                                    </td>                           
      </tr>                            </div>                        </div>                    </div>               
     <div class="input-group">                
     <div class="rs-select2 js-select-simple select--no-search">                         <select name="class">                             <option disabled="disabled" selected="selected">CLASS</option>                             <option>Class 1</option>            
                 <option>Class 2</option>                             <option>Class 3</option>                
         </select>                         <div class="select-dropdown"></div>                     </div>                 </div>                 <div class="row row-space">                     <div class="col-2">                         <div class="input-group">                             <input class="input--style-1" type="text" placeholder="REGISTRATION CODE" id="res_code" name="res_code">                         </div>                     </div>                 </div>                 <div class="p-t-20">                     <button name="send" id="send" class="btn btn--radius btn--green" type="submit">Submit</button>                 </div>             </form>             <br>             <?php              echo "<table border=1>";             echo "<tr>";             echo "<td>ID</td>";             echo "<td>NAME</td>";             echo "<td>DOB</td>";             echo "<td>Gen</td>";             echo "<td>Cls</td>";             echo "<td>RG No</td>";             echo "<td>Hb</td>";             echo "<td>CHK</td>";             echo "<td>Usr Gen</td>";             echo "<td colspan=2>Act</td>";             echo "</tr>";             echo "</thead>";              if ($regis = $connection-> query("SELECT * FROM registration ORDER BY id ASC")){                 $i =1;                 foreach ($regis as $registration) {                     ?>                     <tbody>                         <tr>                           <th scope="row"><?php echo $i++; ?></th>                           <td><?php echo $registration['name']; ?></td>                           <td><?php echo $registration['birthday']; ?></td>                           <td><?php echo $registration['gender']; ?></td>                           <td><?php echo $registration['class']; ?></td>                           <td><?php echo $registration['res_code']; ?></td>                           <td><?php echo $registration['hobbies']; ?></td>                           <td><?php echo $registration['vcl']; ?></td>                           <td><?php echo $registration['user_gender']; ?></td>                           <td> <a href="edit.php?id=<?php echo $registration['id']; ?>&edit=Y"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a> </td>                           &nbsp                           <td><a href="delete.php?id=<?php echo $registration['id']; ?>&del=y" onClick="return confirm('Do you really want to delete this ?');"><i class="fa fa-trash-o" aria-hidden="true"></i></a>                           </td>                       </tr>                   <?php } $regis->close(); }                     $connection->close();                    ?>               </tbody>           </table>       </div>   </div> </div> </div> <!-- Jquery JS--> <script src="vendor/jquery/jquery.min.js"></script> <!-- Vendor JS--> <script src="vendor/select2/select2.min.js"></script> <script src="vendor/datepicker/moment.min.js"></script> <script src="vendor/datepicker/daterangepicker.js"></script> <!-- Main JS--> <script src="js/global.js"></script> <script type="text/javascript"> /*$("#send").click(function(e){ var name = $("#name"); var birthday = $("#birthday"); var gender = $("gender"); //var class = $("class"); var res_code = $("res_code"); if(!name.val()){ $("#name").css("border", "1px solid red"); $("#name").focus(); e.preventDefault(); } if(!birthday.val()){ $("#birthday").css("border", "1px solid red"); $("#birthday").focus(); e.preventDefault(); } if(!gender.val()){ $("#gender").css("border", "1px solid red"); $("#gender").focus(); e.preventDefault(); } if(!res_code.val()){ $("#res_code").css("border", "1px solid red"); $("#res_code").focus(); e.preventDefault(); } */ //}); </script> </body><!-- This templates was made by Colorlib (https://colorlib.com) -->
 
INSERT.PHP
include_once 'config.php';
$name =  $_POST['name'];
       $birthday =  $_POST['birthday'];
       $gender =  $_POST['gender'];
       $class = $_POST['class'];
       $res_code =  $_POST['res_code'];
       $a = $_POST['hobbies'];
       $hobbies = implode(",", $a);
       $c = $_POST['vcl'];
       $vcl = implode(",", $c);
       $user_gender = $_POST['user_gender'];

query ("INSERT INTO registration (name,birthday,gender,class,res_code,hobbies,vcl,user_gender) VALUES ('$name','$birthday','$gender','$class','$res_code','$hobbies','$vcl','$user_gender') ");       if($insert)         {         $msg="Inserted";         echo "alert('$msg');
";         header('Location:index.php');         }   }       else       {        $errormsg="Error !!! Coba Lagi !!";        echo "alert('$errormsg');";        header('Location:index.php');       } $connection->close(); ?>
     
EDIT.PHP

include_once 'config.php';
 if(isset($_GET['id']))
   {
     $id=$_GET['id'];
     if(isset($_POST['update']))
     {
     $name=$_POST['name'];
     $birthday=$_POST['birthday'];
     $gender=$_POST['gender'];
     $class=$_POST['class'];
     $res_code=$_POST['res_code'];
 $b = $_POST['hobbies']; $hobbies=implode(",", $b); $d = $_POST['vcl']; $vcl=implode(",", $d); $user_gender = $_POST['user_gender'];

query ("UPDATE registration SET name='$name',vcl='$vcl', birthday='$birthday', gender='$gender', class='$class', res_code='$res_code', hobbies='$hobbies',user_gender='$user_gender' WHERE id='$id'");     //echo $update_query;die;     if($update_query)     {     echo " alert('Rows are updated successfully');
";     echo "window.location='index.php?msg=Sent sucessfully.';
";       $msg="Secessfully Updated";     //echo '';     //header('Location:index.php');     }   }   }   ?>   <?php     if(isset($_GET['id']))     {     $id = $_GET['id'];     $test_query = $connection->query ("SELECT * from registration WHERE id='$id'");     //print_r($test_query);die;     while($data_fetch = $test_query->fetch_array(MYSQLI_BOTH))     {       //print_r($data_fetch);die;       $name = $data_fetch['name'];       //print_r($name);die;       $birthday = $data_fetch['birthday'];       $gender = $data_fetch['gender'];       $class = $data_fetch['class'];       $res_code = $data_fetch['res_code'];       $a = $data_fetch['hobbies'];       $hobbies = explode(",",$a);       $c = $data_fetch['vcl'];       $vcl = explode(",",$c);       $user_gender = $data_fetch['user_gender'];       //print_r($user_gender);die;   ?> <h2>Updating Data</h2> <form action="" method="post" name="insertform">   <table>    <tr>      <td>Name</td>     <td>:</td>     <td><input type="text" name="name" required placeholder="name" value="<?php echo $name;?>"></td>    </tr>    <tr>      <td>DOB</td>     <td>:</td>     <td><input type="text" name="birthday" required placeholder="birthday" value="<?php echo $birthday;?>"></td>    </tr>     <tr>      <td>Gender</td>     <td>:</td>     <td>       <?php $test_gender = array("S","M","F","O" ); ?>       <select name="gender" required>         <?php foreach ($test_gender as $gender_val ) {           $select = "";           if($gender_val == $data_fetch["gender"]){             $select = "selected";           }         }          ?>         <option value="O"                      <?php if ($data_fetch['gender'] == 'O') echo 'selected="selected"'; ?>>O         </option>         <option value="M"                   <?php if ($data_fetch['gender'] == 'M') echo 'selected="selected"'; ?>>M         </option>         <option value="F"                 <?php if ($data_fetch['gender'] == 'F') echo 'selected="selected"'; ?>>F         </option>       </select>     </td>   </tr>   <tr>     <td>Hobbies</td>           <td>                <input type="checkbox" name="hobbies[]" value='cricket' / <?php if (in_array("cricket", $hobbies)){               echo "checked";              }else { echo "";} ?>>Cricket              <input type="checkbox" name="hobbies[]" value='football' / <?php if (in_array("football", $hobbies)){               echo "checked";              }else { echo "";} ?>>football              <input type="checkbox" name="hobbies[]" value='tenis' / <?php if (in_array("tenis", $hobbies)){               echo "checked";              } else { echo ""; } ?>>Tenis              <input type="checkbox" name="hobbies[]" value='vollyball' / <?php if (in_array("vollyball", $hobbies)){               echo "checked";              } else { echo ""; } ?>>Vollyball           </td>      </tr>     <tr>     <td>Vechile</td>           <td>                <input type="checkbox" name="vcl[]" value='bike' / <?php if (in_array("bike", $vcl)){               echo "checked";              } ?>>Bike              <input type="checkbox" name="vcl[]" value='car' / <?php if (in_array("car", $vcl)){               echo "checked";              } ?>>Car              <input type="checkbox" name="vcl[]" value='boat' / <?php if (in_array("boat", $vcl)){               echo "checked";              } ?>>Boat           </td>      </tr>     <!-- checked radio button -->     <tr>         <td align="left"> Usr Gender : </td>           <td>             <?php             $radio1 = "";             $radio2 = "";             $radio3 = "";             if($data_fetch["user_gender"] == "Male"){             $radio1 = "checked";             }elseif($data_fetch["user_gender"] == "Female"){             $radio2 = "checked";             }elseif ($data_fetch["user_gender"] == "Other") {               $radio3 = "checked";             }             ?>           <input type="radio" name="user_gender" value="Male" <?php echo $radio1; ?>/> Male                         <input type="radio" name="user_gender" value="Female" <?php echo $radio2; ?>/> Female           <input type="radio" name="user_gender" value="Other" <?php echo $radio3; ?>/> Other         </td>         </tr>    <tr>      <td>class</td>     <td>:</td>     <td><input type="text" name="class" required placeholder="" value="<?php echo $class;?>"></td>    </tr>    <tr>      <td>class</td>     <td>:</td>     <td><input type="text" name="res_code" required placeholder="" value="<?php echo $res_code;?>"></td>    </tr>   </table>     <input type="submit" name="update" value="Update"/>     <input type="button" name="cancel" value="cancel" onClick="window.location.href='index.php';" />    </p>   </form>   <?php } } ?> 

SQL/MYSQL/ORACLE Query

  • CREATE DATABASE IF NOT EXISTS database;
  • DROP DATABASE
  • delhi_buss_record_system,metro_management_system,school_management_system;
  • (CREATE TABLE)
  • CREATE TABLE NORTH_BUSESS_DRIVER_DETAILS(Driver_id INT(11) PRIMARY KEY,DRIVER_NAME VARCHAR(255),PHONE_NUMBER VARCHAR(255),ADDRESS VARCHAR(255),JOINING_DATE DATETIME(6));
  • CREATE TABLE WORKER(WORKER_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    FIRST_NAME CHAR(25),LAST_NAME CHAR(25),SALARY INT(20),JOINING_DATE DATETIME,
    DEPARTMENT CHAR(25));
  • CREATE TABLE NORTH_BUSESS_DRIVER_DETAILS(Driver_id INT(11) PRIMARY KEY,DRIVER_NAME VARCHAR(255),PHONE_NUMBER VARCHAR(255),ADDRESS VARCHAR(255),JOINING_DATE DATETIME(6));
  • (ALTER ADD Column)
  • ALTER TABLE north_busess_driver_details ADD COLUMN shift VARCHAR(255);
  • (ALTER MODIFY)
  • ALTER TABLE north_busess_driver_details MODIFY COLUMN shift INT(255);
  • ALTER TABLE north_busess_driver_details MODIFY COLUMN JOINING_DATE DATE;
  • (RENAME CHANGE ALTER)(ALTER TABLE CHANGE COLUMN NAME)
  • ALTER TABLE north_busess_driver_details CHANGE COLUMN DRIVER_NAME D_NAME VARCHAR(255);
  • (ALTER DROP COLUMN)
  • ALTER TABLE north_busess_driver_details DROP COLUMN shift;
  • (ALTER ADD MULTIPLE COLUMN)
  • ALTER TABLE north_busess_driver_details ADD COLUMN Shift VARCHAR(255),ADD COLUMN Timing DATETIME(6);
    ALTER TABLE north_busess_driver_details ADD COLUMN F_NAME VARCHAR(255),EDUCATION VARCHAR(255);

    ALTER TABLE north_busess_driver_details DROP COLUMN Timing,DROP COLUMN LATE;
  • (INSERT QUERY)
    INSERT INTO north_busess_driver_details(Driver_id,D_NAME,PHONE_NUMBER,ADDRESS,JOINING_DATE,Shift,Timing,F_NAME,EDUCATION,LATE)VALUES(‘022′,’OPI’,’909090′,’DEL’,’12/6/2016′,’EVE’,’09’,’IU’,’11TH’,’5 MINITES’);
  • INSERT INTO Worker
    (WORKER_ID, FIRST_NAME, LAST_NAME, SALARY, JOINING_DATE, DEPARTMENT) VALUES
    (001, ‘Monika’, ‘Arora’, 100000, ’14-02-20 09.00.00′, ‘HR’),
    (002, ‘Niharika’, ‘Verma’, 80000, ’14-06-11 09.00.00′, ‘Admin’),
    (003, ‘Vishal’, ‘Singhal’, 300000, ’14-02-20 09.00.00′, ‘HR’),
    (004, ‘Amitabh’, ‘Singh’, 500000, ’14-02-20 09.00.00′, ‘Admin’),
    (005, ‘Vivek’, ‘Bhati’, 500000, ’14-06-11 09.00.00′, ‘Admin’),
    (006, ‘Vipul’, ‘Diwan’, 200000, ’14-06-11 09.00.00′, ‘Account’),
    (007, ‘Satish’, ‘Kumar’, 75000, ’14-01-20 09.00.00′, ‘Account’),
    (008, ‘Geetika’, ‘Chauhan’, 90000, ’14-04-11 09.00.00′, ‘Admin’);
  • (ALIAS (AS)
  • SELECT FIRST_NAME AS W_F FROM worker;
  • (Upper Case)
  • SELECT upper(FIRST_NAME) FROM worker;
  • (DISTINCT)
  • SELECT DISTINCT DEPARTMENT FROM worker;
  • (SUBSTRING )
  • SELECT substring(FIRST_NAME,1,3) FROM worker;
    SELECT SUBSTRING(LAST_NAME,1,2) FROM worker;
    SELECT SUBSTRING(LAST_NAME,1,4) FROM worker;
    SELECT SUBSTRING(LAST_NAME,2,5) FROM worker;
  • (INSTR)
    SELECT INSTR(FIRST_NAME,BINARY’A’) FROM worker WHERE FIRST_NAME = ‘amitabh’;
  • (SELECT QUERY FETCH ALL DATA)
  • SELECT * FROM north_busess_driver_details;
  • (WHERE CLAUSE)
    SELECT * FROM north_busess_driver_details WHERE Driver_id =’1′;
  • SELECT * FROM north_busess_driver_details WHERE D_NAME=’ABC’;
  • (IT WILL FETCH THE DETAILS WHAT WE HAVE MENTION IN QUERY)
  • SELECT Driver_id,D_NAME,PHONE_NUMBER FROM north_busess_driver_details WHERE Shift=’Morning’;
  • (AND OPERATOR IN SELECCT QUERY)
  • SELECT * FROM north_busess_driver_details WHERE D_NAME=’OL’ AND PHONE_NUMBER=’099′;
  • (OR OPERATOR IN SELECT QUERY)
  • SELECT * FROM north_busess_driver_details WHERE Driver_id=”011″ OR ADDRESS=”DEL”;
  • SELECT F_NAME,PHONE_NUMBER FROM north_busess_driver_details WHERE ADDRESS=”DEL” AND D_NAME=”OP”;
  • SELECT F_NAME,PHONE_NUMBER FROM north_busess_driver_details WHERE ADDRESS=”DEL” OR D_NAME=”OP”;
  • (DISTINCT)
  • SELECT DISTINCT D_NAME FROM north_busess_driver_details;
  • (DISTINCT COUNT)
  • SELECT COUNT(DISTINCT Driver_id) FROM north_busess_driver_details;
  • (NOT)
  • SELECT * FROM north_busess_driver_details WHERE NOT ADDRESS=’DEL’;
  • SELECT * FROM north_busess_driver_details WHERE NOT ADDRESS=’DEL’ AND NOT ADDRESS=’BIH’;
  • (ORDER BY ASC / DESC)
  • SELECT * FROM north_busess_driver_details ORDER BY Driver_id ASC;
  • SELECT * FROM north_busess_driver_details ORDER BY Driver_id DESC;
  • SELECT * FROM north_busess_driver_details ORDER BY D_NAME DESC;
  • (ASC/DESC WHERE CLAUSE)
  • SELECT * FROM north_busess_driver_details WHERE Driver_id=”11″ ORDER BY D_NAME ASC;
  • (UPDATE COLUMN)
    UPDATE north_busess_driver_details SET D_NAME=’BA’ WHERE Driver_id=’11’;
    (UPDATE overall Table)
    UPDATE north_busess_driver_details SET D_NAME=’BA’;
    UPDATE north_busess_driver_details SET D_NAME=’AA’ AND ADDRESS=’DEL’ WHERE Driver_id=’002′;
  • DELETE FROM north_busess_driver_details WHERE Driver_id=’501′;
  • DELETE FROM north_busess_driver_details;
  • (LIMIT)
  • SELECT * FROM north_busess_driver_details LIMIT 25;
  • (LIMIT PERTICULAR)
    SELECT Driver_id FROM north_busess_driver_details LIMIT 30;
  • SELECT * FROM north_busess_driver_details WHERE Driver_id=’11’ AND D_NAME=’D’ ORDER BY Shift LIMIT 1;
  • SELECT * FROM north_busess_driver_details WHERE Driver_id=’11’ OR D_NAME=’D’ ORDER BY Shift LIMIT 1;
  • (COUNT)
  • SELECT COUNT(Driver_id) FROM north_busess_driver_details;
  • SELECT COUNT(D_NAME) FROM north_busess_driver_details;
  • (AVG)
  • SELECT AVG(D_NAME) FROM north_busess_driver_details;
  • (SUM)
  • SELECT SUM(STATUS) FROM north_busess_driver_details;
  • (LIKE)
  • SELECT * FROM employee WHERE last_name LIKE ‘%a’
  • SELECT * FROM employee WHERE last_name LIKE ‘%S’
  • SELECT * FROM employee WHERE last_name LIKE ‘S%’
  • SELECT * FROM employee WHERE last_name LIKE ‘W%S’
  • SELECT * FROM employee WHERE first_name LIKE ‘%’
  • SELECT * FROM employee WHERE job_title LIKE ‘S%S’;

ALTER

Using Alter Statement we Can Modify column name Add column and Change Data Types

ADD Statement

ALTER TABLE QueryPanel_Employees ADD COLUMN shift VARCHAR(255);

MODIFY Statement

ALTER TABLE QueryPanel_employees MODIFY COLUMN shift char(25);

CHANGE NAME

ALTER TABLE QueryPanel_employees CHANGE COLUMN shift shift_time varchar(225);

DROP COLUMN

ALTER TABLE QueryPanel_employees DROP COLUMN Shift_time;

MULTIPLE COLUMN ADD

ALTER TABLE QueryPanel_employees ADD COLUMN Shift VARCHAR(255),ADD COLUMN Timing DATETIME(6);