Home > database >  Select statement error ORA - 00923: "the FROM keyword not found where expected." "
Select statement error ORA - 00923: "the FROM keyword not found where expected." "

Time:09-28

Just learn SQL, do exercise times wrong, in the,

SQL> Select * from regions;

REGION_ID REGION_NAME
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1 Europe
2 Americas
3 Asia
4 Middle East and Africa

SQL> SQL> The select region_id * 100/5 + 20/10-5 "Meteor small aim-listed Probability %"
2 the from regions;
The select region_id * 100/5 + 20/10-5 AS "Meteor small aim-listed Probability %"
*
The ERROR at line 1:
ORA - 00923: the FROM keyword not found where expected


SQL>

CodePudding user response:

The alias, need not the AS

CodePudding user response:

Do not add the AS also not line,
AS add do not add an error AS
The ERROR at line 1:
ORA - 00923: the FROM keyword not found where expected

CodePudding user response:

Your double quotation marks, format is Chinese format

CodePudding user response:

Wrapping causes problems, try to add a space before 2

CodePudding user response:

Alias doesn't need quotes, and can only be a word (no Spaces) among

CodePudding user response:

Written on the select region_id * 100/5 + 20/10-5 Meteor from regions is right, as to what alias, you consider again

CodePudding user response:

Should be the problem of double quotes, double quotes are in Chinese, the revised results:

SQL> The select region_id * 100/5 + 20/10-5 AS "Meteor small aim-listed Probability %" from regions;

Meteor small aim-listed Probability %
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
17
37
57
77

SQL> The select region_id * 100/5 + 20/10-5 "Meteor small aim-listed Probability %" from regions;

Meteor small aim-listed Probability %
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
17
37
57
77

SQL>
  • Related