Showing posts with label simple. Show all posts
Showing posts with label simple. Show all posts

Friday, April 2, 2010

Happy to Help






Here all procedure is done in 3 tier
Step by step guide
Step 1:
Open visual studio
Select new project or new website
Step 2:
Open “default.aspx” page and select design
Add text box and button as shown in figure
Step 3:
See the code written in BUTTON CODE
Write this code in button event
//see button code in simple delete post 
Step 4:
Goto menu-->open PROJECT select ADD NEW ITEM
Add class file named as “first.cs”
See the code written in VARIABLE CLASS
Write this code in “first.cs” file
//see variable code in simple select post
Step 5:
Go to menu-->open PROJECT select ADD NEW ITEM
Add class file named as “datac.cs”
See the code written in DATA CLASS
Write this code in “datac.cs” file
//see data code in simple insert post
increase your webtraffic See Status of the blog

Thursday, March 18, 2010

Logical AND operator





Logical And operator,operator,earn,learnlogical,learnoperator,logicalearn,learnlogicalearn,logicallearnlogical,earnoperatorlogical,learnearn,operatorearn,learnlogicaloperator,logicaloperatorearn,

The AND operator displays a record if both the first condition and the second condition is true.


It can be used in any valid SQL statement such as select,insert,update,or delete. the and operator requires that each condition must be met for the record to be included in the result set.


syntax

insert into table name where condition1 AND condition2

update tablename set columnname values value where condition1 AND condition2

delete from tabl name where condition1 AND condition2

select from tablname where condition1 AND condition2


EXAMPLE

insert into sqldemo1 (id) values (23) where firstname='sam' AND pass='sam';

Update sqldemo1 set id=34 where firstname='sam' AND pass='sam';

Delete * from sqldemo1 where firstname='sam' AND pass='sam';

select id from sqldemo1 where firstname='sam' AND pass='sam';


























Wednesday, March 17, 2010

DISTINCT clause

Use of DISTINCT clause

In table, some of the columns may contain duplicate values. Sometimes you will want to list only the different (distinct) values in a table.

The DISTINCT clause allows removing duplicates from the result set. and this clause can only be used with select statement.

Syntax

SELECT DISTINCT ColumnName1,ColumnName2 FROM TableName;

OR
SELECT DISTINCT * FROM TableName;
EXAMPLE
SELECT DISTINCT * FROM logintable;

See Status of the blog

site provides a good fundamental knowledge of sql and provide code help to create connection to your site and sql

Monday, March 15, 2010

Simple select query



Learn how to select query ,sqlquerysql,class,select,simple,simpleclass,querysimplequery,classsimple,classselectsql,simpleselect,classsimplesql,selectquery,queryselect,querysqlquery,simpleselectclass,sqlselect,

SQL SELECT Statement

The SELECT statement is used to select data (THROUGH WHICH WE CAN GET DETAIL) from a database.

The result is stored in a result table, called the result-set.

SQL SELECT Syntax


  • SELECT column_name(s) FROM table_name
  • SELECT * FROM table_name
  • select * From table_name where condition
Example

  • SELECT id,password FROM logintable
  • SELECT id FROM logintable WHERE password="sam";









    Sunday, March 14, 2010

    The DELETE Statement




    Learn simple delete statement,sqlclassstatement,delete,statementsqlclass,deletestatement,deletesqlclass,sqlclassdelete,statementsqlclassstatement,sqlclassstatementdelete,statementsqlclassdelete


    The DELETE Statement

    The DELETE statement is used to delete rows in a table.
    ==========================================================
    SQL DELETE Syntax

    DELETE FROM table_name
    WHERE some_column=some_value

    example

    DELETE from logintable
    where id="sam";
    ==============================================================

    DELETE FROM table_name
    WHERE some_column=some_value AND some_column=some_value

    example

    DELETE FROM Persons
    WHERE LastName='sam' AND FirstName='231bk'

    =====================================================

    Delete All Rows

    It is possible to delete all rows in a table without deleting the table.
    This means that the table structure, attributes, and indexes will be intact:

    DELETE FROM table_name;








    Friday, March 5, 2010

    Simple update query

    The UPDATE statement is used to update records in a table.

    Syntax


    UPDATE table_name
    SET column1=value, column2=value2,...


    UPDATE table_name
    SET column1=value, column2=value2,...
    WHERE some_column=some_value

    something new::

    The WHERE clause specifies which record or records that should be updated.
    If you omit the WHERE clause, all records will be updated! so we can use where with update ........



    Here

    TABLE NAME=sqldemo
    column name=id,pass,no,name


    Example

    UPDATE sqldemo
    SET id='167', pass='1123';

    Another example with where statement

    UPDATE sqldemo
    SET id='s167', pass='1s123'
    WHERE no='23e';

    UPDATE sqldemo
    SET id='s167', pass='1s123'
    WHERE no='23e'AND name='sam';


    Check Backlinks

    Tuesday, February 23, 2010

    Simple insert Query

    Simple insert query 

    Here you can learn how to create simple insert query. Its all about how to create a simple insert query for sql server 2005.
    Insert query is also help full when we are firing query to database from .net page.


    Insert intoTable Name select column name1 column name N from Table name
    Example

    Insert into sqldemo (id,password,status) values('sds','sad','sdsa');
    Insert into sqldemo select id,password,status from sqldemo1;
    Here
    - sqldemo is destination table
    - sqldemo1 is source table




    Another insert query with 'where' condition.
    Insert into Table Name select column name1 column name-n from table name where condition

    Example
    Insert into sqldemo select id,password,status from sqldemo1 where id like 'a%';

    see more on sql


    This query is used in inserting data into table

    Page Rank Checker

    See Status of the blog