- 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
Rishi Rathor has Published 155 Articles
Rishi Rathor
813 Views
To calculate age in MySQL from Date of Birth, you can use the following syntax −SELECT YEAR(CURRENT_TIMESTAMP) - YEAR(yourColumnName) - (RIGHT(CURRENT_TIMESTAMP, 5) < RIGHT(yourColumnName, 5)) as anyVariableName from yourTableName;To understand the above concept, let us create a table. The following is the query to create a table.mysql> create table AgeCalculatesDemo ... Read More
Rishi Rathor
71 Views
To add more than 1 column with ALTER table command, you can use MODIFY column command. The syntax is as follows −alter table yourTableName modify column yourColumnName1 dataType, modify column yourColumnName2 dataType, . . . modify column yourColumnNameN dataTypeTo understand the above syntax, let us create a table. The following ... Read More
Rishi Rathor
170 Views
Processing symbol files is a message displayed on xcode when we create a project’s build. When this message appears, in background Xcode downloads files and symbol files for specific device and a specific processor on which build shall be installed.The symbol files contains debug symbols which are used to debug ... Read More
Rishi Rathor
18K+ Views
The best type for price column should be DECIMAL. The type DECIMAL stores the value precisely.For Example - DECIMAL(10, 2) can be used to store price value. It means the total digit will be 10 and two digits will be after decimal point.To understand the type DECIMAL, let us create a ... Read More
Rishi Rathor
549 Views
Use DATEDIFF() function from MySQL to get the difference between two timestamps in days.The syntax is as follows −select datediff(yourColumnName1, yourColumnName2) as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The following is the query to create a table −mysql> create table DifferenceTimestamp ... Read More
Rishi Rathor
9K+ Views
To 1 day to a date in swift we need to create a date first. Once that date is created we have to add specific days to it. In this example we’ll see how we can achieve the same.Let’s create a date first, let it be today, let today = ... Read More
Rishi Rathor
2K+ Views
To add a UISegmentControl in iOS with swift we’ll have to first create a segment control and it’s controller function, i.e. it’s action. Let’s see those steps.Let’s create a function to add a segmented control.func addControl() { let segmentItems = ["First", "Second"] let control = UISegmentedControl(items: segmentItems) ... Read More
Rishi Rathor
159 Views
The str_replace version in MySQL is the replace() function. Let us first create a table to understand the function −mysql> create table StringReplaceDemo −> ( −> Id int, −> URL varchar(200) −> ); Query OK, 0 rows affected ... Read More
Rishi Rathor
1K+ Views
Parse date in MySQL with the help of STR_TO_DATE() function. The syntax is as follows −select str_to_date(yourColumName, ’format’) as anyVariableName from yourTableName;The format in the above syntax is '%d-%b-%y'.Now to understand the above function, let us create a table. The following is the query to create a table −mysql> create ... Read More
Rishi Rathor
158 Views
The difference between MySQL BigInt and int is that INT is a 32-bit long while BIGINT is 64-bit long.The following are some of the points −The BigInt takes 8 bytes of storage while int takes 4 bytes of storage.The int takes 4294967295 maximum values for int(10), whereas 18, 446, 744, ... Read More
To Continue Learning Please Login
Login with Google