Akshaya Akki has Published 46 Articles

How can we remove all the prefixes or suffixes from a given string in MySQL?

Akshaya Akki

Akshaya Akki

Updated on 20-Jun-2020 11:48:45

2K+ Views

MySQL TRIM() function is used to remove all the suffixes or prefixes or both from the string. The working of TRIM() function can be understood with the help of its syntax −SyntaxTRIM([{BOTH | LEADING | TRAILING} [str_to_remove] FROM] string)Here,  the argument BOTH means the prefixes from both left and right ... Read More

What happens with the output of MySQL EXPORT_SET() function if I will skip both 4th and 5th argument i.e. separator and number of bits?

Akshaya Akki

Akshaya Akki

Updated on 20-Jun-2020 09:00:18

104 Views

As we know that the default value of the fifth argument i.e. number of bits is 64, hence if we will not specify any value on fifth argument them MySQL will check the bits up to 64 bits and produce the result. Whereas, on skipping the fourth argument i.e. separator, ... Read More

How can we pass an empty string as a parameter to BIT_LENGTH() function and what would be returned by MySQL?

Akshaya Akki

Akshaya Akki

Updated on 20-Jun-2020 08:16:21

252 Views

Whenever we want to pass an empty string as a parameter to BIT_LENGTH() function then we must have to pass blank quotes (even without any space). It cannot pass without quotes because MySQL then resembles it as the function without any argument and returns an error. But, when we pass ... Read More

How can we delete a single row from a MySQL table?

Akshaya Akki

Akshaya Akki

Updated on 20-Jun-2020 07:31:48

391 Views

We can use DELETE statement along with a WHERE clause, which identifies that particular row, to delete a row from MySQL table.Examplemysql> Select * from names; +------+-----------+ | id   | name      | +------+-----------+ | 1    | Rahul     | | 2    | Gaurav   ... Read More

What is MySQL DELETE command used for?

Akshaya Akki

Akshaya Akki

Updated on 20-Jun-2020 06:01:49

259 Views

MySQL DELETE command is used to delete the row/s from a table. It is used with WHERE clause.SyntaxDELETE From Table_name WHERE Condition;ExampleIn the example below, we have deleted the rows from table ‘employee’ where id >=100.mysql> select * from employee; +------+--------+ | Id   | name   | +------+--------+ | ... Read More

How can we emulate CHECK CONSTRAINT by using MySQL GENERATED COLUMN?

Akshaya Akki

Akshaya Akki

Updated on 19-Jun-2020 13:39:16

150 Views

As we know that MySQL supports foreign key for referential integrity but it does not support CHECK constraint. But we can emulate them by using triggers. It can be illustrated with the help of an example given below −ExampleSuppose we have a table named ‘car’ which can have the fix ... Read More

What is the difference between getter and setter in JavaScript?

Akshaya Akki

Akshaya Akki

Updated on 16-Jun-2020 08:15:05

958 Views

GetterWhen a property is accessed, the value gets through calling a function implicitly. The get keyword is used in JavaScript. An identifier, either a number or a string is allowed for set.SetterWhen a property is set, it implicitly calls a function and the value is passed as an argument. With ... Read More

What is a constructor to create String object in JavaScript?

Akshaya Akki

Akshaya Akki

Updated on 15-Jun-2020 07:09:25

155 Views

To create a String object in JavaScript, use string.constructor. A constructor returns a reference to the string function that created the instance's prototype.ExampleYou can try to run the following code to create a String object with the constructor −Live Demo           JavaScript String constructor Method   ... Read More

How to create a big font text using JavaScript?

Akshaya Akki

Akshaya Akki

Updated on 15-Jun-2020 06:55:29

935 Views

To create a big font text, use the JavaScript big() method. This method causes a string to be displayed in a big font as if it were in a BIG tag.ExampleYou can try to run the following code to create a big font text −Live Demo         ... Read More

How to create a strikethrough text using JavaScript?

Akshaya Akki

Akshaya Akki

Updated on 15-Jun-2020 06:52:04

5K+ Views

To create a strikethrough text with JavaScript, use the strike() method. This method causes a string to be displayed as struck-out text as if it were in a tag.ExampleYou can try to run the following code to create a strikethrough text −Live Demo           JavaScript ... Read More

Advertisements