Photo by Luke Chesser on Unsplash
  • Views are logical tables which are based on one or more Tables, views, functions or synonyms.
  • View does not store the data itself.
  • The tables which are used in the view are called base table.
  • View retrieves the records at the time of execution and displays it in the result set.

Using DML Statements against the view :-

  • We can only update/Insert/Delete records of one table at a time…


Index in SQL



Syntax of using count() :

Count () can be used in SELECT statement as well as in GROUP BY clause.

SELECT COUNT(EXPRESSION) FROM TABLE_NAME;
SELECT COLUMN_NAME,COUNT(EXPRESSION) FROM TABLE_NAME GROUP BY COLUMN_NAME HAVING COUNT(EXPRESSION) RELATIONAL_OPERATOR VALUE;
emid	ename	cmpny
NULL NULL 0
NULL NULL 0
NULL NULL 0
SELECT count(*)
FROM [tb_emp_table]
3


Syntax of declaring the variable:

There are two ways of declaring the variable:

  • Declaring and defining the variable at the same time
  • Only declaring and defining in another line
var num1=10;
var strnum1='10';
//declaring
var…

Truncate :-

  • Truncate does not take where clause as it removes all the records from the table.
  • Truncate does not require commit command to commit the changes.
  • Truncate is fast compared Delete Statement.

Syntax:-

Delete :-

  • We can Delete some specific records by using where clause and then it remove only those records.
  • Delete requires commit command…

Below reasons are responsible for not using ==.

  1. Execution Time
  2. Confusion while debugging.
  1. Execution time:- Where ever it is found by js engine that “==” is used, then javascript will first type cast the second operand value in the data of first operand after which,it compares the both the operand values. While in “===” , it directly compares the both the value and returns the boolean value.
  • Confusion while debugging:- Whenever while debugging the code, if let’s say first operand is of type integer and second operand is of string data type, then it may confuse the person and also it is not a good practice to use string to represent the number value.

Thank you please follow me


Example :-

Explanation:-

In above example if vr1 is not value then ‘some value' string value will be assigned to vr2.

Vishal Pathak

I am a Software Developer in MNC company and I do Freelancing and blogging as well.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store