Kumar Varma has Published 110 Articles

Update table with duplicate ids in MySQL

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

464 Views

Following is the syntax −update yourTableName set yourColumnName1= yourValue where yourColumnName2=yourValue order by yourColumnName2 DESC LIMIT 1;Let us first create a table −mysql> create table DemoTable    -> (    -> Id int,    -> Name varchar(100)    -> ); Query OK, 0 rows affected (0.61 sec)Insert some records in ... Read More

Multiply values of two columns and display it a new column in MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

3K+ Views

Let us first create a table −mysql> create table DemoTable    -> (    -> NumberOfItems int,    -> Amount int    -> ); Query OK, 0 rows affected (0.57 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(4, 902); Query OK, 1 row affected ... Read More

Select last record and update it in MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

2K+ Views

For this, you can use ORDER BY DESC LIMIT. Let us first create a table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> Name varchar(100)    -> ); Query OK, 0 rows affected (0.59 sec)Insert some records in the table ... Read More

HTML DOM Input Checkbox form Property

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

113 Views

The HTML DOM Input Checkbox form property returns the form containing the input checkbox.SyntaxFollowing is the syntax −Returning reference to the form objectinputCheckboxObject.formExampleLet us see an example of HTML DOM Input Checkbox form property − Live Demo Student Details Show Form ID: ... Read More

HTML DOM Input Checkbox Object

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

319 Views

The HTML DOM Input Checkbox Object represents an input HTML element with type checkbox.SyntaxFollowing is the syntax −Creating an with type checkboxvar checkboxObject = document.createElement(“input”); checkboxObject.type = “checkbox”;AttributesHere, “checkboxObject” can have the following attributes −AttributesDescriptionautofocusIt defines if the checkbox should be focused on initial page load.checkedIt defines the state ... Read More

HTML DOM Input Checkbox type Property

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

71 Views

The Input Checkbox type property returns/sets type of Input Checkbox.SyntaxFollowing is the syntax −Returning string valueinputCheckboxObject.typeSetting type to string valueinputCheckboxObject.type = stringValueString ValuesHere, “stringValue” can be the following -stringValueDetailscheckboxIt defines that input type is checkboxradioIt defines that input type is radiotextIt defines that input type is textExampleLet us see an example ... Read More

HTML DOM Input Color autofocus Property

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

65 Views

The HTML DOM Input Color autofocus property sets/returns whether Input Color is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputColorObject.autofocusSetting autofocus to booleanValueinputColorObject.autofocus = booleanValueBoolean ValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that input will be autofocused on page load.falseIt is the default value ... Read More

HTML DOM Input Color disabled Property

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

104 Views

The HTML DOM Input Color disabled property sets/returns whether Input Color is enabled or disabled.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputColorObject.disabledSetting disabled to booleanValueinputColorObject.disabled = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that the input color is disabled.falseIt defines that the input color is not disabled and ... Read More

HTML DOM Input Color name Property

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

53 Views

The Input Color name property returns a string, which is the value of the input color name attribute. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputColorObject.nameSetting name attribute to a string valueinputColorObject.name = ‘String’ExampleLet us see an example of Input Color name property − Live Demo ... Read More

HTML DOM Input Color type Property

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

90 Views

The HTML DOM Input Color type property returns/sets type of Input Color.SyntaxFollowing is the syntax −Returning string valueinputColorObject.typeSetting type to string valueinputColorObject.type = stringValueString ValuesHere, “stringValue” can be the following −stringValueDetailsColorIt defines that input type is colorRadioIt defines that input type is radioTextIt defines that input type is textExampleLet us see ... Read More

Previous 1 ... 5 6 7 8 9 ... 11 Next
Advertisements