Home > database >  Oracle two tables connection problem
Oracle two tables connection problem

Time:10-16

Single query there is no problem, but when two tables tries to connect, to 01861 wrong, but if the connection after writing conditions, and can filter out the result, but no date condition, at 01861,

CodePudding user response:

Stick the SQL data types and two tables, should be the problem of the field type

CodePudding user response:

reference 1st floor yoyohey response:
paste the SQL data types and two tables, should be the problem of the field type
select * from a, b, where=b.q a.q qq qq directly at 01861 this way, if you add a where clause a.c cc='a', can the results, if add conditions where a. d. dd=date, to 01861 if in the previous conditions plus the and rownum<100, can be a result, a table with date fields, type b table no date field

CodePudding user response:

refer to the second floor Pan Andi response:
Quote: refer to 1st floor yoyohey response:
paste the SQL data types and two tables, should be the problem of the field type
select * from a, b, where=b.q a.q qq qq directly at 01861 this way, if you add a where clause a.c cc='a', can the results, if add conditions where a. d. dd=date, to 01861 if in the previous conditions plus the and rownum<100, you can leave as a result, the table has a date field, b type table no date field

The field type problem, two tables of relationship is what, can directly put table structure? You this description is not very clear, the where a. d. ate field=b table type the date field, need to add to_Date, suggested that baidu first

CodePudding user response:

Two different table field must not associated

CodePudding user response:

There are some data in the table is not in conformity with the specification, for example,
Table a. d. a. dd this field is not date

CodePudding user response:

 
- if the type of the field is the date, do not need to add to_date (), if not the date type to add
Select * from a, b where a.q qq=to_date (b.q qq, 'yyyy - mm - dd hh24: mi: ss')
  • Related