- 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
Rama Giri has Published 110 Articles
Rama Giri
142 Views
Let us first create a table −mysql> create table DemoTable -> ( -> EmployeeName varchar(100) -> ); Query OK, 0 rows affected (0.81 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Adam Smith'); Query OK, 1 row affected (0.12 sec) mysql> ... Read More
Rama Giri
90 Views
Use the CASE statements and set conditions for the same. Let us first create a table −mysql> create table DemoTable -> ( -> X int, -> Y int -> ); Query OK, 0 rows affected (0.57 sec)Insert some records in the table using insert command −mysql> ... Read More
Rama Giri
193 Views
Let us first create a table −mysql> create table DemoTable -> ( -> ArrivalDate datetime -> ); Query OK, 0 rows affected (0.91 sec)Insert some records in the table using insert command. Let’s say the current date is 2019-07-03 −mysql> insert into DemoTable values('2019-07-03'); Query OK, 1 ... Read More
Rama Giri
84 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Value int -> ); Query OK, 0 rows affected (0.80 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(10); Query OK, 1 row affected (0.17 sec) mysql> insert ... Read More
Rama Giri
1K+ Views
Use group_concat() function from MySQL to concatenate. Let us first create a table −mysql> create table DemoTable -> ( -> Subject varchar(10) -> ); Query OK, 0 rows affected (0.43 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('C'); Query OK, 1 ... Read More
Rama Giri
71 Views
Yes, we can use ADD and CHANGE with ALTER statement. Let us first create a table −mysql> create table DemoTable -> ( -> Name varchar(100), -> Age int -> ); Query OK, 0 rows affected (0.84 sec)Now check the description of table.mysql> desc DemoTable;OutputThis will produce ... Read More
Rama Giri
11K+ Views
For this, you can use UNIQUE INDEX −alter table yourTableName ADD UNIQUE INDEX(yourColumnName1, yourColumnName2, ....N);Let us first create a table −mysql> create table DemoTable -> ( -> Value1 int, -> Value2 int -> ); Query OK, 0 rows affected (0.55 sec)Following is the query to add ... Read More
Rama Giri
77 Views
JavaScript date setUTCSeconds() method sets the seconds for a specified date according to universal time.The following are the parameters for setUTCSeconds(secondsValue[, msValue]) methodLsecondsValue − An integer between 0 and 59, representing the seconds.msValue − A number between 0 and 999, representing the milliseconds.ExampleYou can try to run the following code ... Read More
Rama Giri
98 Views
In case of updateable views, it is quite possible that we update the data that is not visible through the view because we create a view to revealing only the partial data of a table. Such kind of updates makes the view inconsistent. We can ensure the consistency of views ... Read More
Rama Giri
90 Views
With the help of SHOW STATUS statement, we can get the count of MySQL event-related operations. It can be used as follows −mysql> SHOW STATUS LIKE '%event%'; +--------------------------+-------+ | Variable_name | Value | +--------------------------+-------+ | Com_alter_event | 16 | | ... Read More