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
Kumar AU
1.4k
309
62k
Need Help on Sql Query - how to get the recently deleted rec
Jun 27 2016 3:15 AM
Dear All,
Please help me I am new to SQL
Could you please let me know how to get the recently deleted records from the below Table. Here I need to make a query only on rows which has more than 1 rows for the same Number column
I need Result like this :-
ID FName LName Number CreateDate
2 BBBBB B 111111 06-26-2016 01:18:000
3 CCCCC C 333333 06-25-2016 06:10:000
Create Table Users1
(
ID int,
FName varchar (50),
LName Varchar (50),
Number varchar(10),
CreateDate Datetime
)
INSERT INTO Users1 Values (1,'AAAA','A','11111','06-25-2016 00:10:765')
INSERT INTO Users1 Values (2,'BBBB','B','11111','06-26-2016 01:18:000')
INSERT INTO Users1 Values (3,'CCCC','C','33333','06-25-2016 06:10:000')
INSERT INTO Users1 Values (4,'DDDD','D','44444','06-25-2016 06:10:000')
INSERT INTO Users1 Values (5,'EEEE','E','55555','06-25-2016 23:10:000')
INSERT INTO Users1 Values (6,'FFFF','F','33333','06-25-2016 00:01:000')
INSERT INTO Users1 Values (7,'FFFF','G','77777','06-26-2016 00:01:000')
INSERT INTO Users1 Values (8,'FFFF','H','88888','06-26-2016 16:01:000')
INSERT INTO Users1 Values (9,'FFFF','F','99999','06-26-2016 23:01:000')
Reply
Answers (
5
)
table data copying in sql
Help Required on SQL search the the fields till space/-