Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 delete query

Author  Topic 

newbie007
Starting Member

37 Posts

Posted - 2009-03-24 : 12:23:38
1)What is the query to delete certain rows from a table subject to some condtions ? eg : table with name,id, tel no . I need to delete all entries for names beginning with "k"



2)Is it possible to get the output of a query (in query analyser)saved as a new table in the database ? In the above example can i get the new table saved in my database ?

3) what determines the max file size a table can accommodate - is it the size given when creating a database? If one gives "unrestricted file growth" will there be still limitations on table size ?

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-24 : 12:25:49
1. DELETE FROM TableName WHERE FName like 'K%'
Go to Top of Page

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-24 : 12:27:25
2. Use Select Into to create a new table from a Select statement:

SELECT *
INTO newTable
FROM oldTable
WHERE FName like 'K%'
GO
Go to Top of Page

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-24 : 12:30:11
3. space left on hard-drive can limit the total space used by a table
Go to Top of Page

newbie007
Starting Member

37 Posts

Posted - 2009-03-24 : 12:51:35
quote:
Originally posted by darkdusky

3. space left on hard-drive can limit the total space used by a table


Thanx a lot
Is there any inherent data limitations (like say 65+k rows only for Excel ?)for the tables in a database
Go to Top of Page
   

- Advertisement -