AmitDiwan has Published 10740 Articles

MySQL UNIQUE declaration to avoid inserting duplicate values?

AmitDiwan

AmitDiwan

Updated on 30-Sep-2019 06:46:13

277 Views

Following is the declaration for a UNIQUE clause in MySQL −create table yourTableName (    yourColumnName1 dataType,    yourColumnName2 dataType,    UNIQUE(yourColumnName1),    UNIQUE(yourColumnName1) );Let us first create a table −mysql> create table DemoTable (    Value int,    Value2 int,    UNIQUE(Value),    UNIQUE(Value2) ); Query OK, 0 rows ... Read More

Display distinct dates in MySQL from a column with date records

AmitDiwan

AmitDiwan

Updated on 30-Sep-2019 06:44:28

552 Views

Let us first create a table −mysql> create table DemoTable (    AdmissionDate datetime ); Query OK, 0 rows affected (8.99 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('2010-01-10 12:30:45'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable values('2010-01-10 12:30:45'); Query ... Read More

HTML DOM aside Object

AmitDiwan

AmitDiwan

Updated on 27-Sep-2019 13:07:45

191 Views

The HTML DOM Aside Object represent the element of an HTML document.Create aside object−SyntaxFollowing is the syntax −document.createElement(“ASIDE”);Let us see an example of aside object−Example Live Demo    body {       text-align: center;       background-color: #fff;       color: #0197F6;    }   ... Read More

HTML DOM KeyboardEvent altKey Property

AmitDiwan

AmitDiwan

Updated on 27-Sep-2019 13:04:15

121 Views

The HTML DOM KeyboardEvent altKey property returns whether an ALT key was pressed or not when a key event was triggered in an HTML document.SyntaxFollowing is the syntax −event.altKeyLet us see an example of HTML KeyboardEvent altKey property−Example Live Demo    body {       color: #000;   ... Read More

HTML DOM Variable Object

AmitDiwan

AmitDiwan

Updated on 27-Sep-2019 13:00:52

242 Views

The HTML DOM Variable Object represent the element of an HTML document.Create var object−SyntaxFollowing is the syntax −document.createElement(“VAR”);Let us see an example of var object−Example Live Demo    body {       text-align: center;       background-color: #fff;       color: #0197F6;    }   ... Read More

HTML DOM HR Object

AmitDiwan

AmitDiwan

Updated on 27-Sep-2019 12:57:52

203 Views

The HTML DOM HR Object represent the element of an HTML document.Create hr object−SyntaxFollowing is the syntax −document.createElement(“HR”);Let us see an example of hr object−Example Live Demo    body {       text-align: center;       background-color: #fff;       color: #0197F6;    }   ... Read More

HTML DOM Ins Object

AmitDiwan

AmitDiwan

Updated on 27-Sep-2019 12:54:08

220 Views

The HTML DOM Ins Object represent the element of an HTML document.Create ins objectSyntaxFollowing is the syntax −document.createElement(“INS”);Properties of ins objectPropertyExplanationciteIt returns and alter the value of the cite attribute of an ins element in an HTML document.dateTimeIt returns and alter the value of the cite attribute of an ... Read More

HTML ondblclick Event Attribute

AmitDiwan

AmitDiwan

Updated on 27-Sep-2019 12:51:36

199 Views

The HTML ondblclick attribute is triggered when you mouse double-click on an HTML element in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML ondblclick event Attribute−Example Live Demo    body {       color: #000;       height: 100vh;     ... Read More

HTML onhashchange Event Attribute

AmitDiwan

AmitDiwan

Updated on 27-Sep-2019 12:36:43

107 Views

The HTML onhashchange event attribute is triggered when there is a change in the anchor part of the URL in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onhashchange event attribute−Example Live Demo    body {       color: #000;     ... Read More

HTML returnValue Event Property

AmitDiwan

AmitDiwan

Updated on 27-Sep-2019 12:33:32

137 Views

The HTML returnValue event property returns and modify whether the current event is cancelled or not.SyntaxFollowing is the syntax −1. Returning returnValueevent.returnValue2. Adding returnValueevent.returnValue=”true | false”Let us see an example of HTML returnValue event property−Example Live Demo    body {       color: #000;       ... Read More

Advertisements