Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

Friday, March 23, 2012

How to create and delete tables in SQL Server.

I have started learning SQL server...please help me to tell me how to create and delete table in a database!!Hi, and welcome to TSDN!

Take a look at this article. Even tho it's written for MySQL the query examples should work on SQL Server as well.

In the future, you might want to consider posting questions about SQL Server in the SQL Server forums, accessible from blue navigation bar at the top of the page.|||I have edited the thread's title to better describe it's content and moved it to the SQL Server forums.
Please read the posting guidelines before posting.

Moderator|||Here is the Microsoft SQL language reference.

Also a very good book I recommend is called SQL Bible by Alex Siegel and Boris Trukhnov. ISBN # 0764525840

You can get it here if your interested.
Barnes & Noble|||Hi darsh999 ,

If you have enterprise manager (sql 2000) or SQL server studio (sql 2005) availabile you can create and delete databases and tables through a gui allowing you to visualise the referential links between the tables.

If not, a good place to start if you are learning is to download SQL 2005 Express and do a full install. This will give you the SQL server studio to practise with.

Regards Purple

How to create an update or delete method in a strongly typed dataset?

Like the subject says, I'm using strongly typed datasets. I'm using to designer to create the datasets and the methods. I can select and insert, but I can't update or delete.

I right click on the adapter bar and select Add Query.

I sleect 'Use SQL Statements'

I select 'Update' (or 'Delete')

I get a sql statement pane containing the word 'Update' ('Delete') and asking 'What data should the table load?'

I can click on next, but anything else gives me errors. I'd list them, but I'm clearly doing something wrong and it's probably obvious.

Diane

Have you made sure that you have set a primary key for your table.|||

The table didn't have a primary key. I added one, but I still don't know how I'm supposed to use update and delete in a recordset.

Diane

|||

Hi Diane,

You can remove and re-add the TableAdapter. Set the SELECT command to select from that table which has primary key.

When you walk to the end of the wizard, it will show you that Update and Delete methods are generated. In this case, you will be able to Update and Delete through the TableAdapter.

|||

Update and Delete have been generated, I just don't know how to use them.

Diane

|||

Hi Diane,

When you have generated the Update and Delete methods, you can call them directly from an instance of TableADapter.

The Update method has several overloads. Some take a DataRow or a DataSet. They can update rows in batch. There is another overload that takes each field value seperately.

The Delete method takes arguments for all the field values, and it will check then delete the row.

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

Wednesday, March 21, 2012

How to create a trigger such that it can delete the rows whenever any other application such as

I had created a trigger which sees that whether a database is updated if it is its copy the values of the updated row into another control table now I want to read the content of control_table into BIzTalk and after reading I want to delete it.Can any one suggest the suitable ay to do this?

Hi,

actually Select has no trigger action, only DML operations are capable. You could use a stored procedure to read the rows rather than using a select statement (don′t know if BizTalk is able to do this through stored procedures).

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||Thanks a lot Jens.

How to create a trigger such that it can delete the rows whenever any other application such as

I had created a trigger which sees that whether a database is updated if it is its copy the values of the updated row into another control table now I want to read the content of control_table into BIzTalk and after reading I want to delete it.Can any one suggest the suitable ay to do this?

Hi,

actually Select has no trigger action, only DML operations are capable. You could use a stored procedure to read the rows rather than using a select statement (don′t know if BizTalk is able to do this through stored procedures).

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

How to create a table and delete it thro codings in asp.net(sql server)

hai,

i want to create a table in a existing database in sql and i have to move data to the table and after my process i have to delete it .This is should be done thro codings.please help me.

Thanks in advance

Viswa

So you need to code it in sql scipts or you want do to it in asp.net c#, vb code

|||

using the code behind vb.net