TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Fareeda Hussain
NA
93
92.4k
how can I fetch column name and its data using query?
Dec 22 2016 4:18 AM
Hi
Can I retrieve the column name and its particular data as two column values .Its possible to fetch column name from INFORMATION_SCHEMA.COLUMNS.Can we get
the data also with the same query like
set @tsql = 'select '+@col +' = Column_name,(select @col from @tablename)
from INFORMATION_SCHEMA.COLUMNS
where Table_name like '''+@tablename+'''
exec(@tsql);
.Or can we put for loop inside the stored procedure
Reply
Answers (
1
)
write trigger after insert to send mail to employeee
Get unique data among multiple items