i want table name basis on column name.
Answers were Sorted based on User's Feedback
Answer / bobby
select * from information_schema.columns where
column_name='orderid'
The above query is used to find all the tables and views in
the Database which contain ‘orderId’ as column name.
But to find only the tables in the Database which
contain ‘orderId’ as column name, use the below query.
select col.table_name from information_schema.columns Col
join information_schema.tables Tab
on col.table_name=tab.table_name and
col.column_name='orderId'and tab.table_type='Base Table'
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / saravanan p
Please find the below query in which, the tables are
selected depends the column name empNo.
select table_name from information_schema.columns where
column_name='empNo'
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / debasis
yes . it's possible
create table emp10(emp10 varchar(20))
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / gowthami radhakrishnan
yes.we can have a column name in the table name.
create table order
(
order varchar(10),
number int
)
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / guruswamy
no,columnname and tablename not same to assign
| Is This Answer Correct ? | 0 Yes | 6 No |
Can you roll back the ddl statement in a trigger?
Different Types of Functions ?
What is 2nf normalization form?
Explain the third normal form(3nf)?
Mention a few common trace flags used with sql server?
List some case manipulation functions in sql?
Can I run multiple instances of sql server 2000 at the same time on one computer?
Define Check points and End Points?
What is the difference between implicit and explicit transaction?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
Suppose in a situation if two list boxes are there and if you select multiple options based on that the options related to those selected items should display in second list box. Again if we select multiple items in second listbox then the related to those selected items should display . In this scenario how will you design database,tables?
What is NOT NULL Constraint in sql server 2012?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)