I need to select data from a table only when the codigo of this table is not in a second table. Briefly that would be it. I have the entregaitem table with the following (codigo,codigoentrega,codigoestoque) columns and the...
I've put this link as an example of where I want to go link
I have the student table.
Ihavethetablewiththesibsids Myproblemis,IneedtodoaselectinsuchawaythatIcanonlymakeonenameappearatatimeandproduceanIDtolinkthesiblings: WiththisquerySELEC...
Good morning
How do I populate a list with a return from an sql?
What I tried to do for sure will give me an outofrange exception
List<string> list = new List<string>();
string query = "select * from pedidos_distribuidos";
st...
I'm trying to make a Select tb1 using Where NOT EXISTS (select* tb2)
I'm trying to select the row in tb1 that does not exist in tb2 to INSERT later.
However when doing test on select it is not returning the lines that do not exist in t...
I am a beginner in PostgreSQL and I need to make a INNER JOIN to relate data from two tables. It took me a long time to figure this out from FOREIGN KEY , but I made the right reference in the database. Now, I have a C # application...
I have this situation and I do not know why it happens. When I pass this SQL command the displayed items come duplicated. What do I do to show an item of each without by the DISTICT
SELECT
T1....
I have several databases on my server and I need to perform a query to return some information from a table that exists on all of these other databases. How can I make a SELECT on multiple bases at the same time?
Consider the following scenario for controlling information about licenses in a database
Products
1 - Solução x
2 - Solução y
3 - Solução z
Suppose you have all 3 solutions
Licenses table
| ID | CLIENTE_ID | PRODUTO_ID | DATA_...
I have a table where a country field is defined. I want to know how I can develop a query that shows me how many records I have for each country.
Example:
Brazil: 10 records from the USA: 5 records
I need to use variables to define the column name in my sql query.
Gender:
SELECT IDLayout, Nome, @collum, TipoProduto
FROM ProdutoLayout
WHERE (TipoProduto = @tipo) AND (@collum = 1)
Since @collum is the...