Sql Server Relation [closed] - sql

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
is any scientific reason to create a table with self join and 1 to many relation in the same table >>>
what i need is explain why we can't do this
thanks for your time .

Yes, they are perfectly valid situations that need such relations.
For example when you store a Tree on a table. Each node will have links to its childs (through a ParentId column), so it will have a relation 1 to many with itself.

Related

SQL showing the results of two queries [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have two tables. Customers and Employees and I want a query that displays all customers and employees who live in California.
How would I go about doing that?
Take a look at the UNION https://www.w3schools.com/sql/sql_union.asp. Be aware that when SELECT-ing both have to have selected the same amount of columns.

What is Delta key in SQL table? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I know that Delta key is a column in SQL table that should be of datetime type. But what is the purpose of Delta key?
There is nothing like Delta key in SQL Server for sure. If you will check the MSDN you can confirm this. You might take a look at SQL Delta which I guess you might be looking for.

What does 'indexes' do in sql query [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I come to know that this is used to speed up data retrieval..I like to know more about it .Thanks .
Indexing is a way of sorting a number of records on multiple fields. Creating an index on a field in a table creates another data structure which holds the field value, and pointer to the record it relates to. This index structure is then sorted, allowing Binary Searches to be performed on it.

I am looking for a SQL script to sync a table from db A to db B [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am still learn SQL and I need to have table A sync'd to table B in a different DB. Does anyone have a script to do that or point me in the right direction.
Thanks
INSERT INTO current_DB.A
(SELECT * FROM another_DB.B)

SQL Query - How to find a field with two or more same characters in it [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm using SQL Server DB and I would like to write query which will look for a fields with two or more slashes in it, lets say we have these rows:
1. abc/def/g
2. abcd/efg
3. a/b/c/d/e/f/g
So it should return 1st and 3rd row! What is the easiest way to do so?
Thanks in advance!