DDBMS Components

Ricky Barnes
Updated on 20-Jun-2020 08:48:53

5K+ Views

The contents of a distributed database are spread across multiple locations. That means the contents may be stored in different systems that are located in the same place or geographically far away. However, the database still appears uniform to the users i.e the fact that the database is stored at multiple locations is transparent to the users.The different components of a distributed database are −Let us now discuss them one by one −UsersThere are many users who use the distributed database. For them, the fact that the database is spread across multiple locations is transparent and they perceive the database ... Read More

MySQL ELT Function Behavior with Out-of-Range Index

karthikeya Boyini
Updated on 20-Jun-2020 08:48:29

122 Views

MySQL ELT() function returns NULL as output if the index number provided as argument is higher than the number of strings. Following is an example to make it clearer −Examplemysql> Select ELT(6,'Ram','is','a','good','boy')As Result; +--------+ | Result | +--------+ | NULL   | +--------+ 1 row in set (0.00 sec)As we can see that index number is 6 and the list of strings is having only 5 strings. Hence MySQL returns NULL.

HTML DOM Textarea Readonly Property

AmitDiwan
Updated on 20-Jun-2020 08:47:11

229 Views

The HTML DOM Textarea readOnly property returns and modify whether the content of a text area element in an HTML document should be read only or not.SyntaxFollowing is the syntax −1. Returning readOnlyobject.readOnly2. Adding readOnlyobject.readOnly = true | falseLet us see an example of HTML DOM Textarea readOnly Property −Example    body {       color: #000;       background: lightseagreen;       height: 100vh;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%; ... Read More

MySQL FIND_IN_SET Function Returns NULL Output

Swarali Sree
Updated on 20-Jun-2020 08:46:53

338 Views

FIND_IN_SET() function returns NULL as output if any of the argument i.e. either search string or string list, is NULL. Of course, It will also return NULL if both of the arguments are NULL.Examplemysql> Select FIND_IN_SET(NULL,'Ram is a good boy') AS Result; +--------+ | Result | +--------+ | NULL   | +--------+ 1 row in set (0.00 sec) mysql> SELECT FIND_IN_SET('RAM',NULL)AS RESULT; +--------+ | RESULT | +--------+ | NULL   | +--------+ 1 row in set (0.00 sec) mysql> SELECT FIND_IN_SET(NULL,NULL); +------------------------+ | FIND_IN_SET(NULL,NULL) | +------------------------+ |                   NULL | +------------------------+ 1 row in set (0.00 sec)

Overview of Packages in Oracle

Alex Onsman
Updated on 20-Jun-2020 08:46:22

888 Views

Packages are SQL procedures, functions, variables, statements etc. that are grouped into a single unit. Many different applications can share the contents of a package, as it is stored in the database.Parts of a PackageThe following are the parts of a package in Oracle −Package SpecificationThe package specifications contains information about all the procedures, functions, variables, constants etc. stored inside it. It has the declaration of all the components but not the code.All the objects that are in the specification are known as public objects. If there is any object that is not available in the specification but is coded ... Read More

Use FIND_IN_SET Function with MySQL WHERE Clause

Arushi
Updated on 20-Jun-2020 08:45:16

1K+ Views

When we use FIND_IN_SET() function in WHERE clause then it searches the search string within the given string as specified in the argument and retrieves all the columns from concerned rows. Following is an example to demonstrate it −ExampleIn this example, we are getting the columns from ‘Student’ table where the rows have the value of name as ‘Gaurav’. Here the FIND_IN_SET() function will search the search string ‘Gaurav’ from the values of column ‘Name’.mysql> Select Id, Name, Address, Subject from student WHERE FIND_IN_SET('Gaurav', Name); +------+--------+---------+-----------+ | Id   | Name   | Address | Subject   | +------+--------+---------+-----------+ ... Read More

Put Spaces Between Words Starting with Capital Letters in Python

Samual Sam
Updated on 20-Jun-2020 08:43:36

844 Views

The problem we are trying to solve here is to convert CamelCase to separate out words. We can solve this directly using regexes by finding all occurrences of a capital letter in the given string and put a space before it. We can use the sub method from the re module.For example, for the input string −AReallyLongVariableNameInJavaWe should get the output −A Really Long Variable Name In JavaWe can use "[A-Z]" regex to find all uppercase letters, then replace them with space and that letter again. We can implement it using the re package as follows −Example Live Demoimport re ... Read More

What MySQL Returns for NULL in FIELD Function

Ankith Reddy
Updated on 20-Jun-2020 08:43:16

113 Views

In case if all the arguments (list of strings) of FIELD() function are NULL then MySQL will return 0 as output.Examplemysql> Select FIELD('Ram',NULL,NULL,NULL,NULL); +----------------------------------+ | FIELD('Ram',NULL,NULL,NULL,NULL) | +----------------------------------+ |                               0  | +----------------------------------+ 1 row in set (0.00 sec)

What MySQL Returns If Search String in FIELD Function is NULL

Vikyath Ram
Updated on 20-Jun-2020 08:42:50

145 Views

As we know that NULL fails equality comparison with any value hence if the search string, provided in FIELD() function, is NULL then MySQL returns 0 as output.Examplemysql> Select FIELD(NULL,'Ram','is','good','boy'); +-------------------------------------+ | FIELD(NULL,'Ram','is','good','boy') | +-------------------------------------+ |                                   0 | +-------------------------------------+ 1 row in set (0.00 sec)

What MySQL Returns When Search String Is Not in FIELD Function

Anjana
Updated on 20-Jun-2020 08:42:27

127 Views

Suppose if the search string is not in the list of strings provided as the arguments in FIELD() function then MySQL will return 0 as output.Examplemysql> Select FIELD('Ram','New','Delhi'); +----------------------------+ | FIELD('Ram','New','Delhi') | +----------------------------+ |                         0  | +----------------------------+ 1 row in set (0.00 sec)

Advertisements