Articles on Trending Technologies

Technical articles with clear explanations and examples

MySQL query to extract last word from a field?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 3K+ Views

To extract last word from a field, use in-built SUBSTRING_INDEX() function. The syntax is as follows −SELECT SUBSTRING_INDEX(yourColumnName, ’ ‘, -1) 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 FirstWordDemo −> ( −> AllWords longtext −> ); Query OK, 0 rows affected (0.83 sec)Now insert some words in the table using insert command. The query is as follows −mysql> insert into FirstWordDemo values('This is the first MySQL Query'); Query OK, 1 row affected (0.11 ...

Read More

Select last 20 records ordered in ascending order in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 718 Views

To select last 20 records in ascending order, you can use subquery LIMIT clause. The syntax is as followsSELECT *FROM (    SELECT *FROM yourTableName ORDER BY yourColumnName desc limit 20 ) anyVariableName order by anyVariableName.yourColumnName;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table ProductInformation    -> (    -> ProductId int,    -> ProductName varchar(100),    -> ProductPrice int    -> ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert command. The query is as followsmysql> insert into ProductInformation values(101, 'Product-1', ...

Read More

What is embedded bitcode and what does ENABLE_BITCODE do in xcode?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 446 Views

Bitcode – Bitcode is an intermediate reperesentation of how the code looks. This code can not be used by us or can’t be installed on a device. When we upload our application to the app store It is uploaded as an bitcode and later converted to app binary by itunes/Apple.When the Intermediate code is created an uploaded to the App store or run on the device, a program called LLMV takes over the control and converts the Intermediate code to a Binary file which is x86 32Bit or x86 64 bit for the simulator and ARM for the actual iOS handheld ...

Read More

What are the different IT Career courses in India?

Samrat T
Samrat T
Updated on 30-Jul-2019 147 Views

Information technology – often shortened to just IT – is a buzz phrase you would probably hear when you talk about anything related to computers. IT nerds are often highly specialized in their particular field and are a part of every single company, small or big. They are the essential employees of each and every modern business model. Hence we can say there is no dearth of options for an IT guy.Here are some of the courses which carve your IT Career in India:A bachelor's degree in computer science is the basic education required for almost all IT jobs.Cloud Architecture ...

Read More

How to find all uppercase strings in a MySQL table?

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 1K+ Views

To find all upper case strings in a MySQL table, you need to use BINARY UPPER() function. The syntax is as follows:SELECT *FROM yourTableName WHERE yourColumnName=BINARY UPPER(yourColumnName);To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table FindUpperCaseDemo    -> (    -> Id int,    -> FirstName varchar(20),    -> Age int    -> ); Query OK, 0 rows affected (1.04 sec)Insert some records in the table using insert command. The query is as follows:mysql> insert into FindUpperCaseDemo values(1, 'John', 23); Query OK, 1 row affected (0.17 sec) mysql> ...

Read More

Java Program to get the maximum of three long values

Samual Sam
Samual Sam
Updated on 30-Jul-2019 248 Views

Firstly, let us declare and initialize three long values −long val1 = 98799; long val2 = 98567; long val3 = 98768;Now, find the maximum of three long values using the following condition −// checking for maximum if (val2 > val1) { val1 = val2; } if (val3 > val1) { val1 = val3; }The following is the complete example to get the maximum value −Example Live Demopublic class Demo { public static void main(String[] args) { long val1 = 98799; ...

Read More

How to resolve the error that occurs while using a reserved word as a table or column name in MySQL?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 1K+ Views

This error occurs when you try to use a reserved word as a table or column name. It can occur due to −Case 1: Whenever you use reserved word as a table name −mysql> create table insert −> ( −> Id int −> );The error is as follows −ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insert ( Id int )' at line 1The above error occurred because the word ‘insert’ is a keyword in MySQL.Case 2 − Whenever you ...

Read More

How can a query multiply 2 cells for each row in MySQL?

George John
George John
Updated on 30-Jul-2019 248 Views

You can use multiplication operator (*) between two cells. The syntax is as followsSELECT yourColumnName1, yourColumnName2, yourColumnName1*yourColumnName2 as ‘anyVariableName’ from yourTableName;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table MultiplicationDemo    -> (    -> FirstPrice int,    -> SecondPrice int    -> ); Query OK, 0 rows affected (0.63 sec)Now you can display all records from the table using insert command. The query is as followsmysql> insert into MultiplicationDemo values(10, 2); Query OK, 1 row affected (0.17 sec) mysql> insert into MultiplicationDemo values(4, 2); Query OK, ...

Read More

How to Add Live Camera Preview to UIView in Swift?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 892 Views

To add a live camera preview to our default UIView in swift we can either use AVFoundation framework of iOS SDK or native UIImagePickerController(). In this example we’ll be using ImagePicker as our aim is to present camera preview on the UIView and Imagepicker is suitable for that task. AVFoundation can be used when we need a lot of customization on our camera or different types of custom actions.To show a camera preview on the UIView we need to perform the following steps.Create a UIImagePickerController object.Conform our class to UIImagePickerControllerDelegate and UINavigationControllerDelegate.Assign delegates to the object we created in step ...

Read More

SELECT MySQL rows where today's date is between two DATE columns?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 1K+ Views

To select MySQL rows where today’s date is between two date columns, you need to use AND operator. The syntax is as follows:SELECT *FROM yourTableName WHERE yourDateColumnName1 = ‘’yourDateValue’;To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table selectDates -> ( -> Id int NOT NULL AUTO_INCREMENT, -> StartingDate date, -> EndingDate date, -> PRIMARY KEY(Id) -> ); Query OK, 0 rows affected (0.80 sec)Now you can insert some records in ...

Read More
Showing 59611–59620 of 61,248 articles
Advertisements