Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts

Monday, January 9, 2017

table, insert, update, delete

table, insert, update, delete :
how to create a table with commend prompt:

kono database a kaj korte hole use database name dite hoy:
ex CREATE DATABASE advance;
use advance; aito holo akon ai database a kaj korbe. database changed hole.
create table given(
id INT(11) NOT NULL AUTO_INCREMENT,
name varchar(100)  NOT NULL,
roll int(11) NOT NULL,
subject varchar(11) NOT NULL,
semester int(2) NOT NULL,
cgpa float NULL,
PRIMARY KEY (id)
);


table ar column show kortehole  describe or explain use korte pari

column gulo re valu add korbo:
INSERT INTO given (name) VALUES(
NULL,
'RANIT'
);

dakta chile:
SELECT * FROM given for all 



SELECT name, another FROM given tahole specific gulo show korbe




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


Delete:
DELETE FROM given WHERE id=1;


Tuesday, December 27, 2016

SQL

sql:
is a language

mysql:
is not a language. je machine  a reke database ar kaj kori satai mysql.

sql ta ke manage korar aro software, engine asa ar modde mysql akta.
http://localhost/phpmyadmin/ ar system ta ke mysql bol jaite pare. database management system tai holo mysql


sql niya kaj:
Using CMD to manage and edit Databases
setting up database,
creating database,
show database.

Cmd: commend prompt option diya kaj korbo


The default is: C:\Users\Ranit>
now i put cd\ that mensa C:\Users\Ranit>cd\ then it's back to C:\>
Now i want to inter a form at c drive the C:\>cd foldername
Now I want to create  make directory then C:\>cd foldername mkdir name
Now i will first find mysql folder the inter bin see mysql.exe

show databases:

Working with table, Insert, Update, Delete:

what is table: where data will set. so for table  we need row and column

Data Type :  we can see all in here and description
https://www.tutorialspoint.com/mysql/mysql-data-types.htm

1 means 1-9
11 means 99999999999
collation is set automatically . If you want to know default then search on google. default collation of mysql data type
utf8_swedish_ci is default

Attributes is default set.
Index primary then the data will be unique . That means the value will be different. so we will on auto increment
for name we will use varchar
one table just one primary

cmd:
CREATE DATABASE
to select database then write use database name.

show tables
to create table: create table()