How to query data from table which has "GROUP" as column name, since it's keyword?

Showing Answers 1 - 6 of 6 Answers

Hi,
 
   Send me mail if satisfied .

Thanks.
Madhupriya

SQL> create table string("group" varchar2(20),name varchar2(20));

Table created.

SQL> insert into string values('&group','&name');
Enter value for group: a
Enter value for name: smith
old   1: insert into string values('&group','&name')
new   1: insert into string values('a','smith')

1 row created.

SQL> /
Enter value for group: b
Enter value for name: scott
old   1: insert into string values('&group','&name')
new   1: insert into string values('b','scott')

1 row created.

SQL> /
Enter value for group: c
Enter value for name: miller
old   1: insert into string values('&group','&name')
new   1: insert into string values('c','miller')

1 row created.

SQL> select  "group" from string;

group
--------------------
a
b
c

SQL> select "group",name from string;

group                NAME
-------------------- --------------------
a                    smith
b                    scott

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions