الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

انشاء جدول ثاني عند الضغط على زر اضافة

بدأه She في 5 يونيو 2013 · 4 رد · 940 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

 

ما الطريق التي يمكن من خلالها أن أعمل جدول جديد عندما يضغط المستخدم زر

أي سوف يظهر نسخة من الجدول الموجود بكل ما فيه من حقول

 

مثل عندما يدخل المستخدم شهاداته ولديه أكثر من شهادة عادة يقوم بملئ الجدول بشهادته الاولى ثم يضغط زر ويظهر له جدول بكل ما فيه من حقول ليدخل شهادته الاخرى

 

 

أحتاج أجابتكم وشكرا لكم

اللهم ما اصبح /امسى بي من نعمة أو بأحد من خلقك فمنك وحدك لا شريك لك فلك الحمد ولك الشكر

#2

السلام عليكم ورحمة الله وبركاته 

 

هذه تعتبر نسخة إحتياطية من الجدول الموجود

 

لأخذ نسخة من الجدول الموجود بكل ما فيه من حقول 

 

 

اقتباس

Select  *       نختار كل الحقول

 

Into    NewTable   إلى الجدول الجديد

 

From   OldTable  من الجدول القديم الموجود بالفعل

 

ولكن هنا سيظهر الجدول الجديد بكل محتويات الجدول القديم

 

ولتفريغ الجدول الجديد

نكتب الكود 

 

Delete From NewTable

#3

The SQL SELECT INTO statement can be used to create backup copies of tables.

The SQL SELECT INTO Statement

The SELECT INTO statement selects data from one table and inserts it into a different table.

The SELECT INTO statement is most often used to create backup copies of tables.

SQL SELECT INTO Syntax

We can select all columns into the new table:

SELECT *
INTO new_table_name [iN externaldatabase]
FROM old_tablename

Or we can select only the columns we want into the new table:

SELECT column_name(s)
INTO new_table_name [iN externaldatabase]
FROM old_tablename

 

SQL SELECT INTO Example

Make a Backup Copy - Now we want to make an exact copy of the data in our "Persons" table.

We use the following SQL statement:

SELECT *
INTO Persons_Backup
FROM Persons

We can also use the IN clause to copy the table into another database:

SELECT *
INTO Persons_Backup IN 'Backup.mdb'
FROM Persons

We can also copy only a few fields into the new table:

SELECT LastName,FirstName
INTO Persons_Backup
FROM Persons

 

SQL SELECT INTO - With a WHERE Clause

We can also add a WHERE clause.

The following SQL statement creates a "Persons_Backup" table with only the persons who lives in the city "Sandnes":

SELECT LastName,Firstname
INTO Persons_Backup
FROM Persons
WHERE City='Sandnes'

 

SQL SELECT INTO - Joined Tables

Selecting data from more than one table is also possible.

The following example creates a "Persons_Order_Backup" table contains data from the two tables "Persons" and "Orders":

SELECT Persons.LastName,Orders.OrderNo
INTO Persons_Order_Backup
FROM Persons
INNER JOIN Orders
ON Persons.P_Id=Orders.P_Id
 

 

 

 

المصدرhttp://www.w3schools.com/sql/sql_select_into.asp

#4
 

This is a great set of two commands that allow the creation and population of a new table with the structure and data of an existing table. This provides a quick means of making a point-in-time copy of a table and is a safe, easy way to make a quick copy of a table for testing an application in development on live data without risking a production environment.


To make a copy of the table recipes which is in a different database called production into a new table called recipes_new in the currently selected database, use these two commands:

CREATE TABLE recipes_new LIKE production.recipes; INSERT recipes_new SELECT * FROM production.recipes;

#5

أشكرك أخي الكريم على اجابتك 

لكن انا اقصد في صفحة الويب كيف ننشأ جدول في الصفحة الويب عند الضغط على زر 

داينميكيا ينشأ جدول في الصفحة مع بقاء الجدول الأول 

اللهم ما اصبح /امسى بي من نعمة أو بأحد من خلقك فمنك وحدك لا شريك لك فلك الحمد ولك الشكر

مواضيع مشابهة