A query’s projection can only have one instance of a given name. As your WHERE clause shows, you have several tables with a column called ID. Because you are selecting *
your projection will have several columns called ID. Or it would have were it not for the compiler hurling ORA-00918.
The solution is quite simple: you will have to expand the projection to explicitly select named columns. Then you can either leave out the duplicate columns, retaining just (say) COACHES.ID or use column aliases: coaches.id as COACHES_ID
.
Perhaps that strikes you as a lot of typing, but it is the only way. If it is any comfort, SELECT *
is regarded as bad practice in production code: explicitly named columns are much safer.
Related Posts:
- ORA-00918: column ambiguously defined in SELECT *
- ORA-00918: column ambiguously defined in SELECT *
- ORA-00904: invalid identifier
- how to fix oracle ORA-01722 invalid number error
- ORA-00979 not a group by expression
- ORA-00907: missing right parenthesis
- How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
- ORA-01843 not a valid month- Comparing Dates
- Oracle error : ORA-00905: Missing keyword
- How do I limit the number of rows returned by an Oracle query after ordering?
- Oracle SELECT TOP 10 records
- Can a foreign key be NULL and/or duplicate?
- How to Select Top 100 rows in Oracle?
- ORA-12560: TNS:protocol adaptor error
- ORA-00972 identifier is too long alias column name
- Oracle Apex column link from LOV values
- PLS-00103: Encountered the symbol when expecting one of the following:
- What’s the difference between RANK() and DENSE_RANK() functions in oracle?
- Oracle – ORA-01489: result of string concatenation is too long [duplicate]
- ORA-01861: literal does not match format string
- What is it exactly a BLOB in a DBMS context
- “ORA-01438: value larger than specified precision allowed for this column” when inserting 3
- How do you create a temporary table in an Oracle database?
- Oracle “Partition By” Keyword
- How to insert date values into table
- Oracle SQL: Update a table with data from another table
- SQL selecting rows by most recent date with two unique columns
- ORA-06502: PL/SQL: numeric or value error: character string buffer too small
- Comparing Dates in Oracle SQL
- Convert timestamp to date in Oracle SQL
- How do I reset a sequence in Oracle?
- Update statement with inner join on Oracle
- MySQL equivalent of DECODE function in Oracle
- Oracle: If Table Exists
- DATEDIFF function in Oracle
- How to create id with AUTO_INCREMENT on Oracle?
- LEFT function in Oracle
- What is the difference between Views and Materialized Views in Oracle?
- How do I view the Explain Plan in Oracle Sql developer?
- ORA-01779: cannot modify a column which maps to a non key-preserved table
- ORA-01735: invalid ALTER TABLE option – Toad
- ora-06553 pls-306 wrong number or types of arguments in call to ‘ogc_x’
- What is a stored procedure?
- Conversion failed when converting date and/or time from character string while inserting datetime
- QL Error: ORA-00933: SQL command not properly ended
- MySQL create table if not exists and insert record only if table was created
- error, string or binary data would be truncated when trying to insert
- Why do we need “Relationships” between tables at all?
- Using group by on multiple columns
- How to declare a variable in MySQL?
- How do I escape a single quote in SQL Server?
- SQL Error: ORA-00942 table or view does not exist
- Teradata: how to convert varchar value (format ‘dd.mm.yyyy’) to date (format ‘yyyy-mm-dd’ )?
- How Stuff and ‘For Xml Path’ work in SQL Server?
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
- must appear in the GROUP BY clause or be used in an aggregate function
- How can I return pivot table output in MySQL?
- Compare dates in MySQL
- Best way to do nested case statement logic in SQL Server
- The multi-part identifier could not be bound
- What does the following Oracle error mean: invalid column index
- MySQL syntax for Join Update
- SQLite – UPSERT *not* INSERT or REPLACE
- how to drop partition without dropping data in MySQL?
- Simple way to calculate median with MySQL
- The ALTER TABLE statement conflicted with the FOREIGN KEY constraint
- Error 1046 No database Selected, how to resolve?
- Is there a combination of “LIKE” and “IN” in SQL?
- How to SUM and SUBTRACT using SQL?
- SELECT DISTINCT on one column
- TSQL PIVOT MULTIPLE COLUMNS
- MySQL – UPDATE multiple rows with different values in one query
- How to create a MySQL hierarchical recursive query?
- Microsoft OLE DB Provider for SQL Server error ‘80004005’
- Equivalent of Oracle’s RowID in SQL Server
- Subtract one day from datetime
- SQL Server: Make all UPPER case to Proper Case/Title Case
- How do I query for all dates greater than a certain date in SQL Server?
- Backup a single table with its data from a database in sql server 2008
- updating table rows in postgres using subquery
- Is there a coalesce-like function in Excel?
- Sqlite: CURRENT_TIMESTAMP is in GMT, not the timezone of the machine
- MySQL LIKE IN()?
- Filter data based on date in sql
- SQL query to extract only the “current” wp_posts?
- How to retrieve sticky post in raw sql?
- How to remove in the wordpress database all posts revisions except the last three?
- Backticks (`) Instead of Single Quotes (‘) in an SQL Statement?
- $wpdb get_var issue
- WP Optimization: Removing Orphaned wp_options (especially the autoload ones)
- Inserting rows into a custom table, when plugin is activated
- dbDelta not creating table (yes, once more)
- Posts modified in the last 48 hours
- post id not displaying
- How to export 2 week’s worth of posts
- Insert multiple checkbox values
- How to get EVENT based on startday, using BETWEEN
- wpdb prepare without placeholder
- How to get the sum of each post with the same date
- How to dump a Microsoft SQL Server database to a SQL script?