Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to see the table design in sql using sql queries ...
Posted

you can use sp_help system stored procedure. To see the design of any table execute sp_help tableName.

Hope this helps.
All the best.
 
Share this answer
 
Comments
marees.nectar 14-Oct-11 4:58am    
The above code is used to see the table view...
i want design view .....i want to change data type....
Try:
SQL
SELECT column_name, data_type, is_nullable, character_maximum_length FROM
information_schema.COLUMNS WHERE table_name='myTable'
 
Share this answer
 
Comments
marees.nectar 14-Oct-11 4:59am    
i didnt know the tables columns
i want design view .....i want to change data type....
in MS SQL

SQL
select * from information_schema.COLUMNS WHERE table_name LIKE 'TABLENAME'
select * from information_schema.KEY_COLUMN_USAGE
select * from information_schema.TABLE_CONSTRAINTS


IN ORACLE
DESC TABLENAME 
 
Share this answer
 
Comments
marees.nectar 14-Oct-11 5:02am    
The above code is used to see the table view...i didnt know the tables columns i want design view .....i want to change data type....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900