Basic select Problem 10

       Basic select Problem


Table Name: Loan


1) Name of all branch from Loan schema?

    SQL Query: select branch_name from loan



2) Name of all distinct branch from Loan schema?

    SQL Query: select distinct branch_name from loan



 3) Name of all branch, amount from Loan schema?

    SQL Query: select branch_name, amount from loan



 4) Name of all loan_number, branch, amount from Loan schema?

    SQL Query: select loan_number, branch_name, amount from loan  

                      Or

                        select * from loan  
   
               Description:  The asterisk symbol " * " can be used denoted " all attributes " 
               


5)  Name of branch_name from loan where loan_number is  " L-23 "
  
    SQL Query: select branch_name from loan where loan_number = 'L-23'



6)  Show amount from loan where loan_number is  " L-23 "
  
    SQL Query: select amount from loan where loan_number = 'L-23'




7)  Show loan_number and amount from loan where branch_name = "Downtown"
  
    SQL Query: select loan_number,amount from loan where branch_name = ' Downtown '




8)  Show loan_number from loan where branch_name = "Round Hill"
  
    SQL Query: select loan_number from loan where branch_name = ' Round Hill '




9)  Show loan_number, amount, branch_name from loan where loan_number = 'L-23'
  
    SQL Query: select loan_number, amount, branch_name  from loan where loan_number = 'L-23'

                         Or
   
                         select *  from loan where loan_number = 'L-23'




10)  Show loan_number, amount, branch_name from loan where branch_name = "Round Hill"
  
    SQL Query: select loan_number, amount, branch_name from loan where branch_name = ' Round Hill '

                      Or
                    
                        select * from loan where branch_name = ' Round Hill '




<-- Back Page


Post a Comment

0 Comments