
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
184 Views
Backticks would work if written correctly as in the below syntax −update `yourTableName` set `yourTableName`.`yourColumnName`='yourNewValue' where yourCondition;Let us first create a −mysql> create table `DemoTable_1401` -> ( -> Name varchar(20) -> ); Query OK, 0 rows affected (0.52 sec)Insert some records in the table using insert −mysql> ... Read More

AmitDiwan
3K+ Views
Each relation may have one or more candidate key. One of these candidate keys is called Primary Key. Each candidate key qualifies for Primary Key. Therefore, candidates for Primary Key is called Candidate Key. To implement candidate key in MySQL, set more than one column as unique key. These keys ... Read More

AmitDiwan
81 Views
No, it is possible to get the next primary key without adding a new record. Let us first create a −mysql> create table DemoTable1399 -> ( -> StudentId int NOT NULL AUTO_INCREMENT, -> PRIMARY KEY(StudentId) -> ); Query OK, 0 rows affected (0.53 sec)Insert some records ... Read More

AmitDiwan
554 Views
Let us first create a −mysql> create table DemoTable1398 -> ( -> Marks int -> ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert −mysql> insert into DemoTable1398 values(78); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable1398 values(82); ... Read More

AmitDiwan
717 Views
For date comparison, you can use STR_TO_DATE(). Following is the syntax −select * from yourTableName where str_to_date(yourColumnName, 'yourFormatSpecifier') > curdate();Let us first create a −mysql> create table DemoTable1397 -> ( -> AdmissionDate varchar(40) -> );s Query OK, 0 rows affected (0.97 sec)Insert some records in the table ... Read More

AmitDiwan
307 Views
Let us first create a −mysql> create table DemoTable1396 -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Name varchar(40), -> Age int -> ); Query OK, 0 rows affected (0.93 sec)Insert some records in the table using insert −mysql> insert into DemoTable1396(Name, ... Read More

AmitDiwan
206 Views
Let us first create a −mysql> create table DemoTable1 -> ( -> Id int -> ); Query OK, 0 rows affected (1.06 sec)Insert some records in the table using insert −mysql> insert into DemoTable1 values(1); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable1 values(NULL); ... Read More

AmitDiwan
280 Views
To sort multiple columns, use ORDER BY GREATEST(). Let us first create a −mysql> create table DemoTable1395 -> ( -> Value1 int, -> Value2 int, -> Value3 int -> ); Query OK, 0 rows affected (0.79 sec)Insert some records in the table using insert −mysql> ... Read More

AmitDiwan
267 Views
For thousands number, use MySQL FORMAT(). Let us first create a −mysql> create table DemoTable1394 -> ( -> Amount decimal(7, 3) -> ); Query OK, 0 rows affected (0.68 sec)Insert some records in the table using insert −mysql> insert into DemoTable1394 values(60); Query OK, 1 row affected ... Read More

AmitDiwan
226 Views
Following is the syntax −select * from yourTableName where yourColumnName like '%a%a%a%';Let us first create a −mysql> create table DemoTable1393 -> ( -> CountryName varchar(40) -> ); Query OK, 0 rows affected (0.71 sec)Insert some records in the table using insert −mysql> insert into DemoTable1393 values('andorra'); Query ... Read More