Posts

Showing posts from July, 2017

Where Clause in sql server

WHERE clause statement is used to filter records. WHERE clause is use to retrieve those records which matches a predefined condition. Where clause not only use for retriveation also use for update and delete Where Clause Query Select * from table_name where condition_here Where clause Example       Select * from employee where Emp_Name=’Sid’;       Select * from employee where emp_Id =1; NOTE Use double quote if you are using text value in where clause and don’t use quotes for numeric field. You can see the example. Operators in where clause These are the operators use in where clause. Operator = Equal <>   Not equal >   Greater than <   Less than >= Greater than or equal <= Less than or equal BETWEEN Between LIKE Search for a pattern IN To

Insert Update Delete and Other Important SQL Commands in MS SQl SERVER

For Fresher it’s important to know few important commands before starting coding You should remember all the commands how and why use. Firstly you should know that commands are not case sensitive, and after ending your any query it’s important to put semicolon (;). It separates the every sql commands. Here is the important Sql Commands in sql. SELECT : Select Command use to take out all data from you database. UPDATE: Update data of database. DELETE:   To delete data from table. INSERT INTO : Inserts new data and new rows into a database CREATE DATABASE : It use to create a new database. ALTER DATABASE: Modifies a database CREATE TABLE : To creates a new table ALTER TABLE : It use to modify and delete in table DROP TABLE: Use to delete a table from database CREATE INDEX : Use to create index in table it retrieves data very fast from database. Index use to speedup searches. DROP INDEX : Use to delete inde

AND, OR and NOT Conditions in Where clause SQL SERVER

Image
We can combined AND, OR, and NOT Conditions in where clause. And and OR Condition are used to retrieve data using multiple conditions ·          And Condition shows data if condition is divide by and in where clause OR condition retrieve rows if conditions are divided by OR Not Condition shows a data if condition is not true AND Query SELECT   * FROM  your_table_name WHERE   condition_1   AND   condition _2   AND   condition_3 ; OR Query SELECT   * FROM  your_ table_name  WHERE   condition _ 1   OR   condition _ 2   OR   condition_3 ; NOT Syntax SELECT   * FROM  your_ table_name WHERE   NOT   condition ; Well this was the syntax now will show you some examples of And, OR and NOT Example AND Condition The Following query returns all rows where “FirstName” is “Nancy” and “LastName” is “Davolio”   Select * From [Employees] where FirstName = 'Nancy' and LastName = 'Davolio' ;   Output

Select query in MS SQL Server

We use Select Query to select data from database which is stored in table, here is the simple select query example using SQL. Select Query Examples Example 1: Select * from Your_table_name; The following Query use to select all columns from a row, (*) this symbol select all rows and column from a table. Example 2: Select column_1, column_2 from your_table_name; If you want select few columns or want to select any particular column from a table so here is the query. This query is to select single, multiple or any columns from a table. 

Disable right click, Inspect Element and page source using JavaScript in Html and asp.net

This is a code to hide right click on any web page and to hide inspect element and page source of page.  I have used JavaScript to hide a source code below is the code. It blocks Ctrl + U , Right click , F12 , and Ctrl+ Shift + J Step One :  copy JavaScript and paste under head tag. <script> document.onkeydown = function(e) { if(event.keyCode == 123) { return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)){ return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)){ return false; } if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)){ return false; } } </script> Step Two :  Put this code  in the body tag. <body oncontextmenu="return false;"> Now you can run your page and check using all the short controls and right click all are disabled now… Happy Coding Day