Kumar Varma has Published 107 Articles

How to use autocomplete attribute in HTML?

Kumar Varma

Kumar Varma

Updated on 04-Oct-2024 11:41:11

554 Views

HTML autocomplete attribute is used with form element to set the autocomplete attribute on or off. If the autocomplete attribute value is set to on, browser will automatically recommend values based on what users entered earlier in the field. If the value is set to off, browser will not recommend ... Read More

Query MySQL with unicode char code?

Kumar Varma

Kumar Varma

Updated on 30-Jun-2020 13:33:31

525 Views

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

How to get total occurrences of a value within its own MySQL query?

Kumar Varma

Kumar Varma

Updated on 30-Jun-2020 13:29:19

211 Views

For this, you can use subquery. Let us first create a table −mysql> create table DemoTable    -> (    -> Value int    -> ); Query OK, 0 rows affected (0.61 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(20); Query OK, 1 row ... Read More

How to remove all instances of a specific character from a column in MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jun-2020 13:26:05

998 Views

Let us first create a table −mysql> create table DemoTable    -> (    -> FirstName varchar(100)    -> ); Query OK, 0 rows affected (0.41 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Adam^^^'); Query OK, 1 row affected (0.14 sec) mysql> insert ... Read More

Select all rows except from today in MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jun-2020 13:19:19

523 Views

Let us first create a table −mysql> create table DemoTable    -> (    -> Name varchar(100),    -> DueDate datetime    -> ); Query OK, 0 rows affected (0.54 sec)Insert some records in the table using insert command. Let’s say the current date is “2019-07-03” −mysql> insert into DemoTable ... Read More

Can I get the count of repeated values in a column with MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jun-2020 13:16:31

1K+ Views

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

How to use if clause in MySQL to display Students result as Pass or Fail in a new column?

Kumar Varma

Kumar Varma

Updated on 30-Jun-2020 13:13:00

1K+ Views

Let us first create a table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> Name varchar(100),    -> Subject varchar(100),    -> Score int    -> ); Query OK, 0 rows affected (0.94 sec)Insert some records in the table using ... Read More

Select the topmost record from a table ordered by desc on the basis of ID?

Kumar Varma

Kumar Varma

Updated on 30-Jun-2020 13:10:20

90 Views

For this, use ORDER BY DESC with LIMIT 1. Let us first create table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> UserName varchar(100),    -> UserMessage text    -> ); Query OK, 0 rows affected (1.17 sec)Insert some records ... Read More

Can we compare numbers in a MySQL varchar field?

Kumar Varma

Kumar Varma

Updated on 30-Jun-2020 13:07:42

1K+ Views

Yes, we can do this by first using CAST(). Let us first create a table −mysql> create table DemoTable    -> (    -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> StudentScore varchar(100)    -> ); Query OK, 0 rows affected (0.66 sec)Insert some records in the table ... Read More

MySQL query to remove a value with only numbers in a column

Kumar Varma

Kumar Varma

Updated on 30-Jun-2020 13:05:28

991 Views

For this, you can use REGEXP. Let us first create a table −mysql> create table DemoTable    -> (    -> ClientCode varchar(100)    -> ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Chris902'); Query OK, 1 row ... Read More

1 2 3 4 5 ... 11 Next
Advertisements