Rama Giri has Published 107 Articles

HTML DOM Input Date disabled Property

Rama Giri

Rama Giri

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

133 Views

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

HTML DOM Input Date name Property

Rama Giri

Rama Giri

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

123 Views

The HTML DOM Input Date name property returns a string, which is the name attribute of input date. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputDateObject.nameSetting name attribute to a string valueinputDateObject.name = ‘String’ExampleLet us see an example of Input Date name property − Live ... Read More

Adding a new column with the current time as a default value in MySQL?

Rama Giri

Rama Giri

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

459 Views

For this, you can use the DEFAULT CURRENT_TIMESTAMP clause in MySQL. Following is the syntax −CREATE TABLE yourTableName (    yourColumnName1 dataType1,    yourColumnName timestamp DEFAULT CURRENT_TIMESTAMP );Let us first create a table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,   ... Read More

Find the greatest value among four tables in MySQL?

Rama Giri

Rama Giri

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

122 Views

To find the greatest value among four tables, you can use the method GREATEST(). Following is the query to create first table −mysql> create table DemoTable1    -> (    -> Value int    -> ); Query OK, 0 rows affected (0.70 sec)Insert some records in the first table using ... Read More

Remove seconds from MySQL Datetime?

Rama Giri

Rama Giri

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

1K+ Views

To remove seconds from MySQL datetime, use UPDATE and SET as in the following syntax −update yourTableName set yourDateColumnName=yourDateColumnName -second(yourDateColumnName);Let us first create a table −mysql> create table DemoTable    -> (    -> Shippingdatetime datetime    -> ); Query OK, 0 rows affected (0.76 sec)Insert some records in the ... Read More

Order by on a specific number in MySQL?

Rama Giri

Rama Giri

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

164 Views

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

How to perform string matching in MySQL?

Rama Giri

Rama Giri

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

310 Views

For string matching, use LIKE operator. Let us first create a table −mysql> create table DemoTable    -> (    -> MonthName varchar(100)    -> ); Query OK, 0 rows affected (0.63 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('JFMA'); Query OK, 1 row ... Read More

Sum the values in a column in MySQL?

Rama Giri

Rama Giri

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

352 Views

For this, use the aggregate function SUM(). Let us first create a table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> € int    -> ); Query OK, 0 rows affected (0.71 sec)Insert some records in the table using insert ... Read More

Return the first n letters of a column in MySQL

Rama Giri

Rama Giri

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

153 Views

To return the first n letters, use the LEFT() function. Following is the syntax −select left(yourColumnName, yourValue) from yourTableName;Let us first create a table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> CourseTitle text    -> ); Query OK, 0 ... Read More

GROUP BY a column in another MySQL table

Rama Giri

Rama Giri

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

319 Views

For this, you can use CREATE TABLE AS SELECT statement. Let us first create a table −mysql> create table DemoTable1    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> CountryName varchar(20)    -> ); Query OK, 0 rows affected (0.68 sec)Insert some records in the ... Read More

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