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
Madhukar Krishna
684
1.4k
294.2k
How to get a main column and multiple sub columns in SQL
Mar 28 2019 2:35 AM
I have a table in SQL Server which looks like this:
STID
SName
SMobile
SAddress
SCollege
1
Madhukar
6787687645
Mithapur
Patna AN College
2
Divya
8796543456
Thane, Mumbai
Pune College
I want it to look like this:
Madhukar
Divya
6787687645
| Mithapur, Patna
| AN College
|8796543456
|Thane, Mumbai
|Pune College
Is it possible in SQL? Any help would be appreciated. I have tried using pivot table but can't get the code right
Reply
Answers (
2
)
Why we create trigger in stored procedure in sql
IS THEIR ANYTHING LIKE NEXTTOP FUNCTION AFTER USING TOP()