Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


i want table name basis on column name.

Answers were Sorted based on User's Feedback



i want table name basis on column name...

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

i want table name basis on column name...

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

i want table name basis on column name...

Answer / debasis

yes . it's possible
create table emp10(emp10 varchar(20))

Is This Answer Correct ?    5 Yes 3 No

i want table name basis on column name...

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

i want table name basis on column name...

Answer / guruswamy

no,columnname and tablename not same to assign

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More SQL Server Interview Questions

What is sql server query analyzer?

0 Answers  


How much is a sql server license?

0 Answers  


What does it mean if @@cursor_row returns a negative number?

0 Answers  


what are the different ways of moving data/databases between servers and databases in sql server? : Sql server database administration

0 Answers  


What is the difference between index seek vs. Index scan?

0 Answers  


how to know Who Is Blocking Your SQL Server?

4 Answers  


How can I create a table from another table without copying any values from the old table?

3 Answers  


How to create a testing table with test data in ms sql server?

0 Answers  


What is Cross Join

3 Answers  


Explain the xml support sql server extends?

0 Answers  


is it possible to use a variable in a query with the IN clause (a,b,c..z), without getting quotes or conversion errors?

2 Answers  


How do I start sql server?

0 Answers  


Categories