Questions tagged as 'sql'

2
answers

SQL MAX of multiple columns

I have this table: ID NUM TIPO CANTIDAD FECHA 451 225 36 60000 2018-05-16 452 225 37 60000 2018-05-16 453 225 38 00001 2018-05-07 454 225 39 60000 2...
asked by 17.11.2018 / 20:56
2
answers

Use VIEW in Postgresql

Hello, Good morning! I have encountered a small problem during the SQL class. I've learned how to make a View, but I do not know how to use them. For example: when you did a search to know the names of teachers who have more than two reser...
asked by 11.04.2016 / 18:29
2
answers

Alternative to clause where IN?

If I consult certain data in a query where in , I would bring the data that match. Example: link But my question is, how do I get the data that does not match and throw it in the query? "Data to consult" is a random lis...
asked by 22.10.2016 / 14:57
2
answers

Two results same column

I have a company table with the id and name columns. And another table operations with the columns send_id , recib_id . I want to get the results name of send_id and receive_id . And how do I get the two different results in php?...
asked by 16.03.2018 / 15:21
1
answer

Problem with foreign keys in hosting with php

Hi, I would like you to help me, someone knows why: create a database with powerdesigner for Mysql. When I upload it locally, phpmyadmin with xammp works, all the foreign keys are created. But when I upload it to phpmyadmin of a hostgat...
asked by 07.03.2018 / 19:11
1
answer

Subtract two values from different tables [closed]

How could I subtract two values from different tables in SQL? I want a column to subtract the user's vacant days off. These days must be the difference between the days you have requested in the applications and the days you have vacations per y...
asked by 26.02.2018 / 13:15
1
answer

Problem when verifying that my user is in the ORACLE database

Is there any kind of conflict with rowCount? The sentence I understand is fine, and I'm using PDO, which also did not give me problems before. The field in the database is VARCHAR2. I attach my code: $user = 'pepito' $con = conne...
asked by 13.02.2018 / 14:41
1
answer

Remove signs from a string in SQL Server

I have a question about an alphanumeric chain, I have to validate that this chain if it has an alphanumeric, for example: EJEMPLO123+ Delete the% "+" and keep the alphanumeric only.     
asked by 26.01.2018 / 00:42
1
answer

how to identify tables without column identity in sql server?

I need to control the SQL bases (several tables) which must have Identity Identifiers in the 'Id' column that they all have. The closest thing I came to this: SELECT distinct TABLE_NAME,COLUMN_Name FROM INFORMATION_SCHEMA.COLUMNS, sys.Objects...
asked by 23.03.2018 / 16:29
2
answers

Does Oracle 11g save the date of the inserts made?

I have a table like the following in oracle: SELECT * FROM ESTUDIANTES; ID NOMBRE EDAD -- ------ ---- 1 Pepe 23 2 Maria 35 ... Can I find out in some way what date the insert was made in that table?     
asked by 14.12.2017 / 12:13