- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Sharon Christine has Published 436 Articles
Sharon Christine
108 Views
The HTML DOM input number readOnly property returns and modify whether the input number field is read-only or not in an HTML document.SyntaxFollowing is the syntax −Returning readOnlyobject.readOnlyModifying readOnlyobject.readOnly = true | falseExampleLet us see an example of input number readOnly property − Live Demo html{ ... Read More
Sharon Christine
113 Views
The HTML DOM id property returns and allow us to set id of an HTML element.SyntaxFollowing is the syntax −1. Returning idobject.id2. Setting idobject.id=”value”Here, “value” represents the id of an element.ExampleLet us see an example of id property − Live Demo p{ background-color:#347924; ... Read More
Sharon Christine
806 Views
To swap data between two columns in MySQL, use the concept of variable. Let us first create a table. Here, we will swap Name1 with Name2 −mysql> create table DemoTable -> ( -> Name1 varchar(100), -> Name2 varchar(100) -> ); Query OK, 0 rows affected (0.58 sec)Insert some records in ... Read More
Sharon Christine
741 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Id int, -> Score int -> ); Query OK, 0 rows affected (0.69 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(1, 858858686); Query OK, 1 row affected ... Read More
Sharon Christine
693 Views
For this, use COALESCE() function from MySQL. Let us first create a table −mysql> create table DemoTable -> ( -> Value1 int, -> Value2 int -> ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(100, 200); Query OK, ... Read More
Sharon Christine
964 Views
For this, you can use COUNT() function. Let us first create a table −mysql> create table DemoTable -> ( -> EmployeeId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> EmployeeName varchar(100) -> ); Query OK, 0 rows affected (0.62 sec)Insert some records in the table using insert ... Read More
Sharon Christine
10K+ Views
To select top 10 records, use LIMIT in MySQL. Let us first create a table −mysql> create table DemoTable -> ( -> PageNumber text -> ); Query OK, 0 rows affected (2.50 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Page-1'); Query OK, 1 row ... Read More
Sharon Christine
144 Views
For this, use ALTER command. Let us first create a table. The default engine is set as“MYISAM” −mysql> create table DemoTable -> ( -> ClientId int NOT NULL AUTO_INCREMENT, -> ClientName varchar(100), -> ClientAge int, -> ClientCountryName varchar(100), -> isMarried boolean, -> PRIMARY KEY(ClientId) -> )ENGINE=MyISAM; Query OK, 0 rows ... Read More
Sharon Christine
199 Views
Use INSERT() function from MySQL. It has the following parameters −ParameterDescriptionstrString to be modifiedpositionPosition where to insert str2numberNumber of characters to replacestr2String to insert into strLet us first create a table −mysql> create table DemoTable -> ( -> Code varchar(100) -> ); Query OK, 0 rows affected ... Read More
Sharon Christine
819 Views
Use ORDER BY and set DESC to order by desc. However, to get all the values except a single value, use the not equal operator.Let us first create a table −mysql> create table DemoTable -> ( -> Name varchar(100) -> ); Query OK, 0 rows affected (0.89 ... Read More